Source files: 239

Click here to show/hide file names

Clones detected: 2002

5459 of 21119 lines are duplicates (25.85%)

Parameters
clustering_threshold = 10
distance_threshold = 10
size_threshold = 4
hashing_depth = 1
clusterize_using_hash = False
clusterize_using_dcup = False

Time elapsed
Construction of AST : 8.80 seconds
Building statement hash : 0.08 seconds
Building patterns : 44.93 seconds
Marking similar statements : 78.04 seconds
Finding similar sequences of statements : 13.88 seconds
Refining candidates : 65.98 seconds
Total time: 211.70
Started at: Mon Mar 17 17:38:28 2014
Finished at: Mon Mar 17 17:40:56 2014

Clone # 1
Distance between two fragments = 0
Clone size = 71
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 75
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 60
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtailcore.grouppagepermission':  {
      'Meta':  {'object_name':  'GroupPagePermission'},
      'group':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'page_permissions'",  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'group_permissions'",  'to':  u"orm['wagtailcore.Page']"}),
      'permission_type':  ('django.db.models.fields.CharField',  [],  {'max_length':  '20'})
    },
    u'wagtailcore.page':  {
      'Meta':  {'object_name':  'Page'},
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'pages'",  'to':  u"orm['contenttypes.ContentType']"}),
      'depth':  ('django.db.models.fields.PositiveIntegerField',  [],  {}),
      'has_unpublished_changes':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'live':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'numchild':  ('django.db.models.fields.PositiveIntegerField',  [],  {'default':  '0'}),
      'owner':  ('django.db.models.fields.related.ForeignKey',  [],  {'blank':  'True',  'related_name':  "'owned_pages'",  'null':  'True',  'to':  u"orm['auth.User']"}),
      'path':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '255'}),
      'search_description':  ('django.db.models.fields.TextField',  [],  {'blank':  'True'}),
      'seo_title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'blank':  'True'}),
      'show_in_menus':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'slug':  ('django.db.models.fields.SlugField',  [],  {'max_length':  '50'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'url_path':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'blank':  'True'})
    },
    u'wagtailcore.pagerevision':  {
      'Meta':  {'object_name':  'PageRevision'},
      'content_json':  ('django.db.models.fields.TextField',  [],  {}),
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'revisions'",  'to':  u"orm['wagtailcore.Page']"}),
      'submitted_for_moderation':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'})
    },
    u'wagtailcore.site':  {
      'Meta':  {'object_name':  'Site'},
      'hostname':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '255',  'db_index':  'True'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_default_site':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'port':  ('django.db.models.fields.IntegerField',  [],  {'default':  '80'}),
      'root_page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'sites_rooted_here'",  'to':  u"orm['wagtailcore.Page']"})
    }
  }
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtailcore.grouppagepermission':  {
      'Meta':  {'object_name':  'GroupPagePermission'},
      'group':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'page_permissions'",  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'group_permissions'",  'to':  u"orm['wagtailcore.Page']"}),
      'permission_type':  ('django.db.models.fields.CharField',  [],  {'max_length':  '20'})
    },
    u'wagtailcore.page':  {
      'Meta':  {'object_name':  'Page'},
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'pages'",  'to':  u"orm['contenttypes.ContentType']"}),
      'depth':  ('django.db.models.fields.PositiveIntegerField',  [],  {}),
      'has_unpublished_changes':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'live':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'numchild':  ('django.db.models.fields.PositiveIntegerField',  [],  {'default':  '0'}),
      'owner':  ('django.db.models.fields.related.ForeignKey',  [],  {'blank':  'True',  'related_name':  "'owned_pages'",  'null':  'True',  'to':  u"orm['auth.User']"}),
      'path':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '255'}),
      'search_description':  ('django.db.models.fields.TextField',  [],  {'blank':  'True'}),
      'seo_title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'blank':  'True'}),
      'show_in_menus':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'slug':  ('django.db.models.fields.SlugField',  [],  {'max_length':  '50'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'url_path':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'blank':  'True'})
    },
    u'wagtailcore.pagerevision':  {
      'Meta':  {'object_name':  'PageRevision'},
      'content_json':  ('django.db.models.fields.TextField',  [],  {}),
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'revisions'",  'to':  u"orm['wagtailcore.Page']"}),
      'submitted_for_moderation':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'})
    },
    u'wagtailcore.site':  {
      'Meta':  {'object_name':  'Site'},
      'hostname':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '255',  'db_index':  'True'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_default_site':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'port':  ('django.db.models.fields.IntegerField',  [],  {'default':  '80'}),
      'root_page':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'sites_rooted_here'",  'to':  u"orm['wagtailcore.Page']"})
    }
  }
complete_apps  =  ['wagtailcore'] complete_apps  =  ['wagtailcore']



Clone # 2
Distance between two fragments = 0
Clone size = 55
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 66
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 39
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtailimages.filter':  {
      'Meta':  {'object_name':  'Filter'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'spec':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'db_index':  'True'})
    },
    u'wagtailimages.image':  {
      'Meta':  {'object_name':  'Image'},
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      'file':  ('django.db.models.fields.files.ImageField',  [],  {'max_length':  '100'}),
      'height':  ('django.db.models.fields.IntegerField',  [],  {}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'uploaded_by_user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'}),
      'width':  ('django.db.models.fields.IntegerField',  [],  {})
    },
    u'wagtailimages.rendition':  {
      'Meta':  {'unique_together':  "(('image',  'filter'),)",  'object_name':  'Rendition'},
      'file':  ('django.db.models.fields.files.ImageField',  [],  {'max_length':  '100'}),
      'filter':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'+'",  'to':  u"orm['wagtailimages.Filter']"}),
      'height':  ('django.db.models.fields.IntegerField',  [],  {}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'image':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'renditions'",  'to':  u"orm['wagtailimages.Image']"}),
      'width':  ('django.db.models.fields.IntegerField',  [],  {})
    }
  }
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtailimages.filter':  {
      'Meta':  {'object_name':  'Filter'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'spec':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255',  'db_index':  'True'})
    },
    u'wagtailimages.image':  {
      'Meta':  {'object_name':  'Image'},
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      'file':  ('django.db.models.fields.files.ImageField',  [],  {'max_length':  '100'}),
      'height':  ('django.db.models.fields.IntegerField',  [],  {}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'uploaded_by_user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'}),
      'width':  ('django.db.models.fields.IntegerField',  [],  {})
    },
    u'wagtailimages.rendition':  {
      'Meta':  {'unique_together':  "(('image',  'filter'),)",  'object_name':  'Rendition'},
      'file':  ('django.db.models.fields.files.ImageField',  [],  {'max_length':  '100'}),
      'filter':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'+'",  'to':  u"orm['wagtailimages.Filter']"}),
      'height':  ('django.db.models.fields.IntegerField',  [],  {}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'image':  ('django.db.models.fields.related.ForeignKey',  [],  {'related_name':  "'renditions'",  'to':  u"orm['wagtailimages.Image']"}),
      'width':  ('django.db.models.fields.IntegerField',  [],  {})
    }
  }
complete_apps  =  ['wagtailimages'] complete_apps  =  ['wagtailimages']



Clone # 3
Distance between two fragments = 0
Clone size = 41
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 31
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 39
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtaildocs.document':  {
      'Meta':  {'object_name':  'Document'},
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      'file':  ('django.db.models.fields.files.FileField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'uploaded_by_user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'})
    }
  }
  models  =  {
    u'auth.group':  {
      'Meta':  {'object_name':  'Group'},
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '80'}),
      'permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'to':  u"orm['auth.Permission']",  'symmetrical':  'False',  'blank':  'True'})
    },
    u'auth.permission':  {
      'Meta':  {'ordering':  "(u'content_type__app_label',  u'content_type__model',  u'codename')",  'unique_together':  "((u'content_type',  u'codename'),)",  'object_name':  'Permission'},
      'codename':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'content_type':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['contenttypes.ContentType']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '50'})
    },
    u'auth.user':  {
      'Meta':  {'object_name':  'User'},
      'date_joined':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'email':  ('django.db.models.fields.EmailField',  [],  {'max_length':  '75',  'blank':  'True'}),
      'first_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'groups':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Group']"}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'is_active':  ('django.db.models.fields.BooleanField',  [],  {'default':  'True'}),
      'is_staff':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'is_superuser':  ('django.db.models.fields.BooleanField',  [],  {'default':  'False'}),
      'last_login':  ('django.db.models.fields.DateTimeField',  [],  {'default':  'datetime.datetime.now'}),
      'last_name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '30',  'blank':  'True'}),
      'password':  ('django.db.models.fields.CharField',  [],  {'max_length':  '128'}),
      'user_permissions':  ('django.db.models.fields.related.ManyToManyField',  [],  {'symmetrical':  'False',  'related_name':  "u'user_set'",  'blank':  'True',  'to':  u"orm['auth.Permission']"}),
      'username':  ('django.db.models.fields.CharField',  [],  {'unique':  'True',  'max_length':  '30'})
    },
    u'contenttypes.contenttype':  {
      'Meta':  {'ordering':  "('name',)",  'unique_together':  "(('app_label',  'model'),)",  'object_name':  'ContentType',  'db_table':  "'django_content_type'"},
      'app_label':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'model':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'}),
      'name':  ('django.db.models.fields.CharField',  [],  {'max_length':  '100'})
    },
    u'wagtaildocs.document':  {
      'Meta':  {'object_name':  'Document'},
      'created_at':  ('django.db.models.fields.DateTimeField',  [],  {'auto_now_add':  'True',  'blank':  'True'}),
      'file':  ('django.db.models.fields.files.FileField',  [],  {'max_length':  '100'}),
      u'id':  ('django.db.models.fields.AutoField',  [],  {'primary_key':  'True'}),
      'title':  ('django.db.models.fields.CharField',  [],  {'max_length':  '255'}),
      'uploaded_by_user':  ('django.db.models.fields.related.ForeignKey',  [],  {'to':  u"orm['auth.User']",  'null':  'True',  'blank':  'True'})
    }
  }
complete_apps  =  ['wagtaildocs'] complete_apps  =  ['wagtaildocs']



Clone # 4
Distance between two fragments = 8
Clone size = 32
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 676
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 710
  def  test_add_sibling_first_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('new',  1,  0),
      ('1
',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('
new',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_first(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('new',  2,  0),
      ('21',  2,  0),
      ('22
',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('
new',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 5
Distance between two fragments = 0
Clone size = 32
Source file "../tests/beets/ui/migrate.py"
The first line is 228
Source file "../tests/beets/util/confit.py"
The first line is 636
class  insideClass:
  def  __init__(self):
    print  "inside"
class  insideClass:
  def  __init__(self):
    print  "inside"
def  represent_mapping(self,  tag,  mapping="0,0",  flow_style=None):
  def  insideFunc(inside):
    return  "Inside"
  value  =  []
  node  =  yaml.MappingNode(tag,  value,  flow_style=flow_style)
  if  self.alias_key  is  not  None:
    self.represented_objects[self.alias_key]  =  node
  best_style  =  True
  testFunc  =  outsideFunc()
  testFunc  =  insideFunc()
  testFunc  =  outsideClass()
  testFunc  =  Dumper.insideClass()
  if  hasattr(mapping,  'items'):
    mapping  =  list(mapping.items())
  for  item_key,  item_value  in  mapping:
    node_key  =  self.represent_data(item_key)
    node_value  =  self.represent_data(item_value)
    if  not  (isinstance(node_key,  yaml.ScalarNode)  and  \
     
  not  node_key.style):
      best_style  =  False
    if  not  (isinstance(node_value,  yaml.ScalarNode)  and  \
     
  not  node_value.style):
      best_style  =  False
    value.append((node_key,  node_value))
  if  flow_style  is  None:
    if  self.default_flow_style  is  not  None:
      node.flow_style  =  self.default_flow_style
    else:
      node.flow_style  =  best_style
  return  node
  def  represent_mapping(self,  tag,  mapping="0,0",  flow_style=None):
    def  insideFunc(inside):
      return  "Inside"
    value  =  []
    node  =  yaml.MappingNode(tag,  value,  flow_style=flow_style)
    if  self.alias_key  is  not  None:
      self.represented_objects[self.alias_key]  =  node
    best_style  =  True
    testFunc  =  outsideFunc()
    testFunc  =  insideFunc()
    testFunc  =  outsideClass()
    testFunc  =  Dumper.insideClass()
    if  hasattr(mapping,  'items'):
      mapping  =  list(mapping.items())
    for  item_key,  item_value  in  mapping:
      node_key  =  self.represent_data(item_key)
      node_value  =  self.represent_data(item_value)
      if  not  (isinstance(node_key,  yaml.ScalarNode)
          and
  not  node_key.style):
        best_style  =  False
      if  not  (isinstance(node_value,  yaml.ScalarNode)
          and
  not  node_value.style):
        best_style  =  False
      value.append((node_key,  node_value))
    if  flow_style  is  None:
      if  self.default_flow_style  is  not  None:
        node.flow_style  =  self.default_flow_style
      else:
        node.flow_style  =  best_style
    return  node



Clone # 6
Distance between two fragments = 5
Clone size = 28
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1239
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1271
  def  test_move_branch_first_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('4',  2,  1),
      ('41',  3,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_first_sibling(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'first-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('4',  2,  1),
      ('41',  3,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_last_child_root(self,  model):
   
target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target
,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  2,  1),
      ('41',  3,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_branch_last_sibling(self,  model):
    ta
rget  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(
target,  'last-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  2,  1),
      ('41',  3,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 7
Distance between two fragments = 5
Clone size = 28
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1020
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1052
  def  test_move_leaf_last_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('231',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_last_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'last-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('231',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_first_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('231',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_first_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('231',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 8
Distance between two fragments = 1
Clone size = 25
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 327
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 237
if  pos  ==  'sorted-sibling':
  siblings  =  list(target.get_sorted_pos_queryset(
    target.get_siblings(),  self))
  if  siblings:
    pos  =  'left'
    target  =  siblings[0]
  else:
    pos  =  'last-sibling'
  if  pos  ==  'sorted-sibling':
    siblings  =  list(target.get_sorted_pos_queryset(
      target.get_siblings(),  newobj))
    if  siblings:
      pos  =  'left'
      target  =  siblings[0]
    else:
      pos  =  'last-sibling'
  if  pos  in  ('left',  'right',  'first-sibling'):
    siblings  =  list(target.get_siblings())

    if  pos  ==  'right':
      if  target  ==  siblings[-1]:
        pos  =  'last-sibling'
      else:
        pos  =  'left'
        found  =  False
        for  node  in  siblings:
          if  found:
            target  =  node
            break
          elif  node  ==  target:
            found  =  True
    if  pos  ==  'left':
      if  target  ==  siblings[0]:
        pos  =  'first-sibling'
    if  pos  ==  'first-sibling':
      target  =  siblings[0]
  if  pos  in  ('left',  'right',  'first-sibling'):
    siblings  =  list(target.get_siblings())

    if  pos  ==  'right':
      if  target  ==  siblings[-1]:
        pos  =  'last-sibling'
      else:
        pos  =  'left'
        found  =  False
        for  node  in  siblings:
          if  found:
            target  =  node
            break
          elif  node  ==  target:
            found  =  True
    if  pos  ==  'left':
      if  target  ==  siblings[0]:
        pos  =  'first-sibling'
    if  pos  ==  'first-sibling':
      target  =  siblings[0]



Clone # 9
Distance between two fragments = 2
Clone size = 25
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2163
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output
  assert  '<input  type="hidden"  id="has-filters"  value="1"/>'  in  \
    table_output
request  =  RequestFactory().get('/admin/tree/?all=1') request  =  RequestFactory().get('/admin/tree/?p=1')
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output

  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output



Clone # 10
Distance between two fragments = 2
Clone size = 23
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2126
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2091
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>' drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>'
assert  table_output.count(drag_handler)  ==  model.objects.count() assert  table_output.count(drag_handler)  ==  model.objects.count()
for  object  in  model.objects.all():
  url  =  cl.url_for_result(object)
  node  =  '<a  href="%s">%s</a>'  %  (url,  object.desc)
  assert  node  in  table_output
for  object  in  model.objects.all():
  url  =  cl.url_for_result(object)
  node  =  '<a  href="%s">Node  %i</a>'  %  (url,  object.pk)
  assert  node  in  table_output
  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output
  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output



Clone # 11
Distance between two fragments = 2
Clone size = 21
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 136
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 41
class  TestImageIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
    def  test_ordering(self):
      orderings  =  ['title',  '-created_at']
      for  ordering  in  orderings:
        response  =  self.get({'ordering':  ordering})
        self.assertEqual(response.status_code,  200)
 
 
class  TestDocumentIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
    def  test_ordering(self):
      orderings  =  ['title',  '-created_at']
      for  ordering  in  orderings:
        response  =  self.get({'ordering':  ordering})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 12
Distance between two fragments = 6
Clone size = 21
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2269
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2214
  def  test_result_tree_list_with_get(self,  model_without_proxy):
    model  =  model_without_proxy
    #  Test  t  GET  parameter  with  value  id

    request  =  RequestFactory().get('/admin/tree/?t=id')
    site  =  AdminSite()
    form_class  =  movenodeform_factory(model)
    admin_class  =  admin_factory(form_class)
    m  =  admin_class(model,  site)
    list_display  =  m.get_list_display(request)
    list_display_links  =  m.get_list_display_links(request,  list_display)
    cl  =  ChangeList(request,  model,  list_display,  list_display_links,
        m.list_filter,  m.date_hierarchy,  m.search_fields,
        m.list_select_related,  m.list_per_page,
        m.list_max_show_all,  m.list_editable,  m)
    cl.formset  =  None
    context  =  Context({'cl':  cl,
          'request':  request})
    table_output  =  self.template.render(context)
    output_template  =  "opener.dismissRelatedLookupPopup(window,  '%i');"
    for  object  in  model.objects.all():
      expected_output  =  output_template  %  object.pk
      assert  expected_output  in  table_output

  def  test_result_tree_list(self,  model_without_proxy):
    """
    Verifies  that  inclusion  ta
g  result_list  generates  a  table  when  with
    default  ModelAdmin  settings.
    """
    model  =  model_with
out_proxy
    request  =  RequestFactory().get('/admin/tree/')
    site  =  AdminSite()
    form_class  =  movenodeform_factory(model)
    admin_class  =  admin_factory(form_class)
    m  =  admin_class(model,  site)
    list_display  =  m.get_list_display(request)
    list_display_links  =  m.get_list_display_links(request,  list_display)
    cl  =  ChangeList(request,  model,  list_display,  list_display_links,
        m.list_filter,  m.date_hierarchy,  m.search_fields,
        m.list_select_related,  m.list_per_page,
        m.list_max_show_all,  m.list_editable,  m)
    cl.formset  =  None
    context  =  Context({'cl':  cl,
          'request':  request})
    table_output  =  self.template.render(context)

    output_template  =  '<li><a  href=
"%i/"  >Node  %i</a>'
    for  object  in  model.objects.all():
      expected_output  =  output_template  %  (object.pk,  object.pk)
      assert  expected_output  in  table_output



Clone # 13
Distance between two fragments = 9
Clone size = 18
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 69
def  model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 14
Distance between two fragments = 9
Clone size = 18
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 74
def  model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 15
Distance between two fragments = 3
Clone size = 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2270
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2090
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/?t=id') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
output_template  =  "opener.dismissRelatedLookupPopup(window,  '%i');" drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>'



Clone # 16
Distance between two fragments = 2
Clone size = 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2219
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2090
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
  table_output  =  self.template.render(context)
table_output  =  self.template.render(context)
output_template  =  '<li><a  href="%i/"  >Node  %i</a>' drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>'



Clone # 17
Distance between two fragments = 8
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 676
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 693
  def  test_add_sibling_first_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('new',  1,  0),
      ('1',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_first(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('
new',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 18
Distance between two fragments = 8
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 693
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 710
  def  test_add_sibling_first(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('
new',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('new',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 19
Distance between two fragments = 9
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 710
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 727
  def  test_add_sibling_left_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('new',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22
',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('
new',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 20
Distance between two fragments = 5
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 710
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 744
  def  test_add_sibling_left_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('
new',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left_noleft_root(self,  model):
    node  =  model.objects.get(desc='1')
    obj  =  node.add_sibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('new',  1,  0),
      ('1
',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 21
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 676
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 744
  def  test_add_sibling_first_root(self,  model):
    node_wch
ildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('first-sibling
',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('new',  1,  0),
      ('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left_noleft_root(self,  model):
    node  =  model.objects.get(desc='1')
    obj  =  node.add_s
ibling('left',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('new',  1,  0),
      ('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 22
Distance between two fragments = 9
Clone size = 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2242
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2219
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request,
  'action_form':  True
})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context)   table_output  =  self.template.render(context)



Clone # 23
Distance between two fragments = 9
Clone size = 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2242
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2090
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request,
  'action_form':  True
})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 24
Distance between two fragments = 1
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2270
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2156
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/?t=id') request  =  RequestFactory().get('/admin/tree/?desc=1')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 25
Distance between two fragments = 1
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2219
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2156
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/?desc=1')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
  table_output  =  self.template.render(context)
table_output  =  self.template.render(context)



Clone # 26
Distance between two fragments = 1
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2090
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2156
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/?desc=1')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 27
Distance between two fragments = 8
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 79
def  model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 28
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 260
class  TestDocumentChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestImageChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 29
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 69
class  TestDocumentChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestRedirectsIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailredirects_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 30
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 48
class  TestDocumentChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestEditorsPicksIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 31
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 7
class  TestDocumentChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestUserIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailusers_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 32
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 260
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 69
class  TestImageChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestRedirectsIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailredirects_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 33
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 260
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 48
class  TestImageChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestEditorsPicksIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 34
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 260
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 7
class  TestImageChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestUserIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailusers_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 35
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 69
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 48
class  TestRedirectsIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailredirects_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestEditorsPicksIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 36
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 69
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 7
class  TestRedirectsIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailredirects_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestUserIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailusers_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 37
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 48
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 7
class  TestEditorsPicksIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 
class  TestUserIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailusers_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 38
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 143
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 7
class  TestQueryChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/queries/chooser/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
class  TestUserIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailusers_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 39
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 143
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 108
class  TestQueryChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/queries/chooser/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
class  TestDocumentChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 40
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 143
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 260
class  TestQueryChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/queries/chooser/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
class  TestImageChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 41
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 143
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 48
class  TestQueryChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/queries/chooser/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
class  TestEditorsPicksIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 42
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 143
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 69
class  TestQueryChooserView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/queries/chooser/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
class  TestRedirectsIndexView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailredirects_index'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
    def  test_search(self):
      response  =  self.get({'q':  "Hello"})
      self.assertEqual(response.status_code,  200)
      self.assertEqual(response.context['query_string'],  "Hello")
 
    def  test_pagination(self):
      pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
      for  page  in  pages:
        response  =  self.get({'p':  page})
        self.assertEqual(response.status_code,  200)
 
 



Clone # 43
Distance between two fragments = 6
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 795
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 778
  def  test_add_sibling_right(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('new',  2,  0),
      ('24',  2
,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_right_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('
new',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 44
Distance between two fragments = 9
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 795
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 761
  def  test_add_sibling_right(self,  model):
    node_wchildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  2

    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0
),
      ('new',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_add_sibling_left_noleft(self,  model):
    node  =  model.objects.get(desc='231')
    obj  =  node.add_sibling('left',  desc='new')
    asse
rt  obj.get_depth()  ==  3
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2
),
      ('new',  3,  0),
      ('231',  3
,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 45
Distance between two fragments = 6
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 829
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 795
  def  test_add_sibling_right_noright(self,  model):
    node
  =  model.objects.get(desc='231')
    obj  =  node.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  3
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2),
      ('231',  3,  0),
      ('new',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_add_sibling_right(self,  model):
    node_wc
hildren  =  model.objects.get(desc='23')
    obj  =  node_wchildren.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  2
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('new',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 46
Distance between two fragments = 8
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 829
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 778
  def  test_add_sibling_right_noright(self,  model):
    node
  =  model.objects.get(desc='231')
    obj  =  node.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  3
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2),
      ('231',  3,  0),
      ('new',  3,  0),
      ('24',  2
,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_add_sibling_right_root(self,  model):
    node_wc
hildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('right',  desc='new')
    assert  obj.get_depth()  ==  1
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('
new',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 47
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 829
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 761
  def  test_add_sibling_right_noright(self,  model):
    node  =  model.objects.get(desc='231')
    obj  =  node.add_sibling('righ
t',  desc='new')
    assert  obj.get_depth()  ==  3
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2),
      ('231',  3,  0),
      ('
new',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_add_sibling_left_noleft(self,  model):
    node  =  model.objects.get(desc='231')
    obj  =  node.add_s
ibling('left',  desc='new')
    assert  obj.get_depth()  ==  3
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2),
      ('new',  3,  0),
      ('231
',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 48
Distance between two fragments = 7
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 157
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 116
edit_handler_class  =  get_snippet_edit_handler(model) edit_handler_class  =  get_snippet_edit_handler(model)
  form_class  =  edit_handler_class.get_form_class(model)
  form_class  =  edit_handler_class.get_form_class(model)
  if  request.POST:
    form  =  form_class(request.POST,  request.FILES,  instance=instance)

    if  form.is_valid():
      form.save()

      messages.success(
        request,
        _("{snippet_type}  '{instance}'  updated.").format(
          snippet_type=capfirst(snippet_type_name),
          instance=instance
        )
      )
      return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)
    else:
      messages.error(request,  _("The  snippet  could  not  be  saved  due  to  errors."))
      edit_handler  =  edit_handler_class(instance=instance,  form=form)
  else:
    form  =  form_class(instance=instance)
    edit_handler  =  edit_handler_class(instance=instance,  form=form)
  if  request.POST:
    form  =  form_class(request.POST,  request.FILES,  instance=instance)

    if  form.is_valid():
      form.save()

      messages.success(
        request,
        _("{snippet_type}  '{instance}'  created.").format(
          snippet_type=capfirst(get_snippet_type_name(content_type)[0]),
          instance=instance
        )
      )
      return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)
    else:
      messages.error(request,  _("The  snippet  could  not  be  created  due  to  errors."))
      edit_handler  =  edit_handler_class(instance=instance,  form=form)
  else:
    form  =  form_class(instance=instance)
    edit_handler  =  edit_handler_class(instance=instance,  form=form)



Clone # 49
Distance between two fragments = 4
Clone size = 16
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 26
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 45
searchform  =  SearchForm(request.GET) searchform  =  SearchForm(request.GET)
  if  searchform.is_valid():
    q  =  searchform.cleaned_data['q']

    #  page  number
    p  =  request.GET.get("p",  1)

    documents  =  Document.search(q,  results_per_page=10,  prefetch_tags=True)

    is_searching  =  True


  else:
    documents  =  Document.objects.order_by('-created_at')

    p  =  request.GET.get("p",  1)
    paginator  =  Paginator(documents,  10)

    try:
      documents  =  paginator.page(p)
    except  PageNotAnInteger:
      documents  =  paginator.page(1)
    except  EmptyPage:
      documents  =  paginator.page(paginator.num_pages)

    is_searching  =  False
  if  searchform.is_valid():
    q  =  searchform.cleaned_data['q']

    #  page  number
    p  =  request.GET.get("p",  1)

    images  =  Image.search(q,  results_per_page=10,  page=p)

    is_sear
ching  =  True

  else:
    images  =  Image.objects.order_by('-created_at')
    p  =  request.GET.get("p",  1)
    paginator  =  Paginator(images,  10)

    try:
      images  =  paginator.page(p)
    except  PageNotAnInteger:
      images  =  paginator.page(1)
    except  EmptyPage:
      images  =  paginator.page(paginator.num_pages)

    is_searching  =  False



Clone # 50
Distance between two fragments = 3
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2272
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2126
request  =  RequestFactory().get('/admin/tree/?t=id') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
output_template  =  "opener.dismissRelatedLookupPopup(window,  '%i');" drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>'



Clone # 51
Distance between two fragments = 2
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2220
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2126
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
  table_output  =  self.template.render(context)
table_output  =  self.template.render(context)
output_template  =  '<li><a  href="%i/"  >Node  %i</a>' drag_handler  =  '<td  class="drag-handler"><span>&nbsp;</span></td>'



Clone # 52
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 151
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 104
  def  test_edit(self):
    response  =  self.post({
      'old_path':  '/test',
      'is_permanent':  'on',
      'redirect_link':  'http://www.test.com/ive-been-edited',
    })

    #  Should  redirect  back  to  index
    self.assertEqual(response.status_code,  302)

    #  Check  that  the  redirect  was  edited
    redirects  =  models.Redirect.objects.filter(old_path='/test')
    self.assertEqual(redirects.count(),  1)
    self.assertEqual(redirects.first().redirect_link,  'http://www.test.com/ive-been-edited')
  def  test_add(self):
    response  =  self.post({
      'old_path':  '/test',
      'is_permanent':  'on',
      'redirect_link':  'http://www.test.com/',
    })

    #  Should  redirect  back  to  index
    self.assertEqual(response.status_code,  302)

    #  Check  that  the  redirect  was  created
    redirects  =  models.Redirect.objects.filter(old_path='/test')
    self.assertEqual(redirects.count(),  1)
    self.assertEqual(redirects.first().redirect_link,  'http://www.test.com/')
  def  test_edit_validation_error(self):
    response  =  self.post({
      'old_path':  '',
      'is_permanent':  'on',
      'redirect_link':  'http://www.test.com/ive-been-edited',
    })

    #  Should  not  redirect  to  index
    self.assertEqual(response.status_code,  200)
  def  test_add_validation_error(self):
    response  =  self.post({
      'old_path':  '',
      'is_permanent':  'on',
      'redirect_link':  'http://www.test.com/',
    })

    #  Should  not  redirect  to  index
    self.assertEqual(response.status_code,  200)



Clone # 53
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 54
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 55
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 56
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 57
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 58
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 59
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 60
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 61
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 62
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 63
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 64
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
def  test_pagination(self):
  pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
  for  page  in  pages:
    response  =  self.get({'p':  page})
    self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 65
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
def  test_pagination(self):
  pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
  for  page  in  pages:
    response  =  self.get({'p':  page})
    self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 66
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
def  test_pagination(self):
  pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
  for  page  in  pages:
    response  =  self.get({'p':  page})
    self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 67
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 68
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 69
Distance between two fragments = 3
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 70
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 71
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 72
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 73
Distance between two fragments = 9
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 830
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 728
node  =  model.objects.get(desc='231') node_wchildren  =  model.objects.get(desc='23')
obj  =  node.add_sibling('right',  desc='new') obj  =  node_wchildren.add_sibling('left',  desc='new')
assert  obj.get_depth()  ==  3 assert  obj.get_depth()  ==  2
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('231',  3,  0),
  ('new
',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('new',  2,  0),
  ('
23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected

  assert  self.got(model)  ==  expected



Clone # 74
Distance between two fragments = 8
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 796
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 728
node_wchildren  =  model.objects.get(desc='23') node_wchildren  =  model.objects.get(desc='23')
obj  =  node_wchildren.add_sibling('right',  desc='new') obj  =  node_wchildren.add_sibling('left',  desc='new')
assert  obj.get_depth()  ==  2 assert  obj.get_depth()  ==  2
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('new',  2
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('new',  2,  0),
  ('
23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 75
Distance between two fragments = 9
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 779
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 762
node_wchildren  =  model.objects.get(desc='2') node  =  model.objects.get(desc='231')
obj  =  node_wchildren.add_sibling('right',  desc='new') obj  =  node.add_sibling('left',  desc='new')
assert  obj.get_depth()  ==  1 assert  obj.get_depth()  ==  3
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('new',  1
,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('new',  3,  0
),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 76
Distance between two fragments = 8
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 762
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 728
node  =  model.objects.get(desc='231') node_wchildren  =  model.objects.get(desc='23')
obj  =  node.add_sibling('left',  desc='new') obj  =  node_wchildren.add_sibling('left',  desc='new')
assert  obj.get_depth()  ==  3 assert  obj.get_depth()  ==  2
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('new',  3,  0
),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('new',  2,  0),
  ('
23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 77
Distance between two fragments = 9
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 745
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 694
node  =  model.objects.get(desc='1') node_wchildren  =  model.objects.get(desc='23')
obj  =  node.add_sibling('left',  desc='new') obj  =  node_wchildren.add_sibling('first-sibling',  desc='new')
assert  obj.get_depth()  ==  1 assert  obj.get_depth()  ==  2
expected  =  [('new',  1,  0),
 
('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('new',  2,  0
),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 78
Distance between two fragments = 9
Clone size = 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2243
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2126
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request,
  'action_form':  True
})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 79
Distance between two fragments = 1
Clone size = 15
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2126
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2158
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/?desc=1')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 80
Distance between two fragments = 9
Clone size = 15
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 10
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 10
  def  forwards(self,  orm):
    if  connection.vendor  ==  'sqlite':
      set_autocommit(True)
    image_content_type,  created  =  orm['contenttypes.ContentType'].objects.get_or_create(
      model='image',  app_label='wagtailimages',  defaults={'name':  'image'})
    add_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=image_content_type,  codename='add_image',  defaults=dict(name=u'Can  add  image'))
    change_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=image_content_type,  codename='change_image',  defaults=dict(name=u'Can  change  image'))
    delete_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=image_content_type,  codename='delete_image',  defaults=dict(name=u'Can  delete  image'))

    editors_group  =  orm['auth.group'].objects.get(name='Editors')
    editors_group.permissions.add(add_permission,  change_permission,  delete_permission)

    moderators_group  =  orm['auth.group'].objects.get(name='Moderators')
    moderators_group.permissions.add(add_permission,  change_permission,  delete_permission)
  def  forwards(self,  orm):
    if  connection.vendor  ==  'sqlite':
      set_autocommit(True)
    document_content_type,  created  =  orm['contenttypes.ContentType'].objects.get_or_create(
      model='document',  app_label='wagtaildocs',  defaults={'name':  'document'})
    add_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=document_content_type,  codename='add_document',  defaults=dict(name=u'Can  add  document'))
    change_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=document_content_type,  codename='change_document',  defaults=dict(name=u'Can  change  document'))
    delete_permission,  created  =  orm['auth.permission'].objects.get_or_create(
      content_type=document_content_type,  codename='delete_document',  defaults=dict(name=u'Can  delete  document'))

    editors_group  =  orm['auth.group'].objects.get(name='Editors')
    editors_group.permissions.add(add_permission,  change_permission,  delete_permission)

    moderators_group  =  orm['auth.group'].objects.get(name='Moderators')
    moderators_group.permissions.add(add_permission,  change_permission,  delete_permission)



Clone # 81
Distance between two fragments = 5
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1097
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1117
  def  test_move_leaf_right_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('231',  2
,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_last_child(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  1),
      ('231',  3
,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 82
Distance between two fragments = 2
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1132
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1117
  def  test_move_leaf_first_child(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  1),
      ('231',  3,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_last_child(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  1),
      ('231',  3,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 83
Distance between two fragments = 5
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1132
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1097
  def  test_move_leaf_first_child(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  1
),
      ('231',  3,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_right_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0
),
      ('231',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 84
Distance between two fragments = 8
Clone size = 15
Source file "../tests/beets/autotag/mb.py"
The first line is 381
Source file "../tests/beets/autotag/mb.py"
The first line is 361
def  track_for_id(trackid):
  """Fetches  a  track  by  its  MusicBrainz  ID.  Returns  a  TrackInfo  object
  or  None  if  no  track  is  found.  May  raise  a  MusicBrainzAPIError.
  """
  trackid  =  _parse_id(trackid)
  if  not  track
id:
    log.error('Invalid  MBID.')
    return
  try:
    res  =  musicbrainzngs.get_recording_by_id(trackid,  TRACK_INCLUDES)
  except  musicbrainzngs.ResponseError:
    log.debug('Track  ID  match  failed.')
    return  None
  except  musicbrainzngs.MusicBrainzError  as  exc:
    raise  MusicBrainzAPIError(exc,  'get  recording  by  ID',  trackid,
      traceback
.format_exc())
  return  track_info(res['recording'])
def  album_for_id(albumid):
    """Fetches  an  album  by  its  MusicBrainz  ID  and  returns  an  AlbumInfo
 
  object  or  None  if  the  album  is  not  found.  May  raise  a
 
  MusicBrainzAPIError.
    """
    albumid  =  _parse_id(albumid)
    if  not  album
id:
      log.error('Invalid  MBID.')
      return
 
  try:
      res  =  musicbrainzngs.get_release_by_id(albumid,
         
RELEASE_INCLUDES)
    except  musicbrainzngs.ResponseError:
      log.debug('Album  ID  match  failed.')
      return  None
    except  musicbrainzngs.MusicBrainzError  as  exc:
      raise  MusicBrainzAPIError(exc,  'get  release  by  ID',  albumid,
        traceb
ack.format_exc())
    return  album_info(res['release'])
 



Clone # 85
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 990
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1067
  def  test_move_leaf_left_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('231',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_first_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('2
31',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 86
Distance between two fragments = 4
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 990
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 975
  def  test_move_leaf_left_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('
231',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_first_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('231',  1,  0),
      ('
1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 87
Distance between two fragments = 4
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1067
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1082
  def  test_move_leaf_first_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('231',  2,  0),
      ('2
1',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_left_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('2
31',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 88
Distance between two fragments = 5
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1035
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1082
  def  test_move_leaf_first_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('231',  2,  0),
      ('2
1',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_left_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('2
31',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 89
Distance between two fragments = 7
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1035
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 990
  def  test_move_leaf_first_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('2
31',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_left_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('231',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 90
Distance between two fragments = 7
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 84
def  model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 91
Distance between two fragments = 9
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1149
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1179
  def  test_move_branch_first_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'first-sibling')
    expected  =  [('4',  1,  1),
      ('41',  2,  0),
      ('1',  1
,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_left_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('4',  1,  1),
      ('41',  2
,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 92
Distance between two fragments = 9
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1164
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1194
  def  test_move_branch_last_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'last-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2
,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_right_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  1,  1),
      ('41',  2,  0),
      ('
3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 93
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 638
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 623
  def  test_add_child_to_node(self,  model):
    model.objects.get(desc='2').add_child(desc='25')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('25
',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_add_child_to_leaf(self,  model):
    model.objects.get(desc='231').add_child(desc='2311')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  1),
      ('2311',  4,  0),
      ('24
',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 94
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 468
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 485
  def  test_get_prev_sibling(self,  model):
    data  =  [
      ('2',  '1'),
      ('
1',  None),
      ('
4',  '3'),
      ('21',  None),
      ('24',  '23'),
      ('22',  '21
'),
      ('231',  None),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_prev_sibling()
      if
  expected  is  None:
        assert  node  is  None
      else:
        assert  node.desc  ==  expected
  def  test_get_next_sibling(self,  model):
    data  =  [
      ('2',  '3'),
      ('
1',  '2'),
      ('4',  None),
      ('2
1',  '22'),
      ('2
4',  None),
      ('22',  '2
3'),
      ('231',  None),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_next_sibling()
      if  ex
pected  is  None:
        asse
rt  node  is  None
      else:
        assert  node.desc  ==
  expected



Clone # 95
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 975
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1067
  def  test_move_leaf_first_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('231',  1,  0),
      ('1',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_first_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('
231',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 96
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 990
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1082
  def  test_move_leaf_left_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('231',  1,  0),
      ('2',  1,  4),
      ('2
1',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_left_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('2
31',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 97
Distance between two fragments = 8
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1035
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 975
  def  test_move_leaf_first_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('
231',  2,  0),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_leaf_first_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'first-sibling')
    expected  =  [('231',  1,  0),
      ('1',  1,  0),
      ('2',  1,  4
),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 98
Distance between two fragments = 4
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1005
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1020
  def  test_move_leaf_right_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22
',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('231',  1
,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_last_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('2
4',  2,  0),
      ('231',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 99
Distance between two fragments = 5
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1005
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1052
  def  test_move_leaf_right_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='231').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22
',  2,  0),
      ('23',  2,  0),
      ('24',  2,  0),
      ('231',  1
,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_leaf_last_sibling(self,  model):
    target  =  model.objects.get(desc='22')
    model.objects.get(desc='231').move(target,  'last-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  0),
      ('2
4',  2,  0),
      ('231',  2,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 100
Distance between two fragments = 6
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1301
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1316
  def  test_move_branch_left_sibling(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'left')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('4',  2,  1),
      ('41',  3,  0),
      ('23',  2,  1),
      ('23
1',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_right_sibling(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('
4',  2,  1),
      ('41',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 101
Distance between two fragments = 6
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1381
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1316
  def  test_move_branch_last_child(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  2),
      ('231',  3,  0
),
      ('4',  3,  1),
      ('41',  4
,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_branch_right_sibling(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('
4',  2,  1),
      ('41',  3,  0),
      ('24',  2,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 102
Distance between two fragments = 6
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1286
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1194
  def  test_move_branch_last_sibling(self,  model):
    target  =  model.objects.get(desc='23')
    model.objects.get(desc='4').move(target,  'last-sibling')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  2,  1),
      ('41',  3
,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected
  def  test_move_branch_right_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  1,  1),
      ('41',  2
,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 103
Distance between two fragments = 5
Clone size = 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1254
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1194
  def  test_move_branch_last_child_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'last-child')
    expected  =  [('1',  1,  0),
      ('2',  1,  5),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  2,  1),
      ('41',  3
,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected

  def  test_move_branch_right_sibling_root(self,  model):
    target  =  model.objects.get(desc='2')
    model.objects.get(desc='4').move(target,  'right')
    expected  =  [('1',  1,  0),
      ('2',  1,  4),
      ('21',  2,  0),
      ('22',  2,  0),
      ('23',  2,  1),
      ('231',  3,  0),
      ('24',  2,  0),
      ('4',  1,  1),
      ('41',  2
,  0),
      ('3',  1,  0)]
    assert  self.got(model)  ==  expected



Clone # 104
Distance between two fragments = 1
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2270
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2242
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/?t=id') request  =  RequestFactory().get('/admin/tree/')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None



Clone # 105
Distance between two fragments = 1
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2242
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2156
model  =  model_without_proxy model  =  model_without_proxy
request  =  RequestFactory().get('/admin/tree/') request  =  RequestFactory().get('/admin/tree/?desc=1')
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) m  =  admin_class(model,  site)
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None



Clone # 106
Distance between two fragments = 8
Clone size = 16
Source file "../tests/fig/tests/container_test.py"
The first line is 39
Source file "../tests/fig/tests/container_test.py"
The first line is 6
def  test_number(self):
  container  =  Container.from_ps(self.client,  {
    "Id":"abc",
    "Image":"ubuntu:12.04",
    "Command":"sleep  300",
    "Created":1387384730,
    "Status":"Up  8  seconds",
    "Ports":None,
    "SizeRw":0,
    "SizeRootFs":0,
    "Names":["/db_1"]
  },  has_been_inspected=True)
  self.assertEqual(container.number,  1)
  def  test_from_ps(self):
    container  =  Container.from_ps(self.client,  {
      "Id":"abc",
      "Image":"ubuntu:12.04",
      "Command":"sleep  300",
      "Created":1387384730,
      "Status":"Up  8  seconds",
      "Ports":None,
      "SizeRw":0,
      "SizeRootFs":0,
      "Names":["/db_1"]
    },  has_been_inspected=True)
    self.assertEqual(container.dictionary,  {
      "ID":  "abc",
      "Image":"ubuntu:
12.04",
      "Name":  "/db_1",
    }
)



Clone # 107
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 108
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 109
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 264
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 110
Distance between two fragments = 1
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 147
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
def  test_pagination(self):
  pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
  for  page  in  pages:
    response  =  self.get({'p':  page})
    self.assertEqual(response.status_code,  200)
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 111
Distance between two fragments = 1
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 52
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 112
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 73
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 113
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 250
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 114
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 45
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 115
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 140
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_search(self):
    response  =  self.get({'q':  "Hello"})
    self.assertEqual(response.status_code,  200)
    self.assertEqual(response.context['query_string'],  "Hello")
  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)

  def  test_pagination(self):
    pages  =  ['0',  '1',  '-1',  '9999',  'Not  a  page']
    for  page  in  pages:
      response  =  self.get({'p':  page})
      self.assertEqual(response.status_code,  200)



Clone # 116
Distance between two fragments = 0
Clone size = 13
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/__init__.py"
The first line is 15
Source file "../tests/wagtail/wagtail/wagtailembeds/embeds.py"
The first line is 20
def  import_string(dotted_path):
    """
    Import  a  dotted  module  path  and  return  the  attribute/class  designated  by  the
    last  name  in  the  path.  Raise  ImportError  if  the  import  failed.
    """
    try:
      module_path,  class_name  =  dotted_path.rsplit('.',  1)
    except  ValueError:
      msg  =  "%s  doesn't  look  like  a  module  path"  %  dotted_path
      six.reraise(ImportError,  ImportError(msg),  sys.exc_info()[2])
 
    module  =  import_module(module_path)
 
    try:
      return  getattr(module,  class_name)
    except  AttributeError:
      msg  =  'Module  "%s"  does  not  define  a  "%s"  attribute/class'  %  (
        dotted_path,  class_name)
      six.reraise(ImportError,  ImportError(msg),  sys.exc_info()[2])
 
 
def  import_string(dotted_path):
    """
    Import  a  dotted  module  path  and  return  the  attribute/class  designated  by  the
    last  name  in  the  path.  Raise  ImportError  if  the  import  failed.
    """
    try:
      module_path,  class_name  =  dotted_path.rsplit('.',  1)
    except  ValueError:
      msg  =  "%s  doesn't  look  like  a  module  path"  %  dotted_path
      six.reraise(ImportError,  ImportError(msg),  sys.exc_info()[2])
 
    module  =  import_module(module_path)
 
    try:
      return  getattr(module,  class_name)
    except  AttributeError:
      msg  =  'Module  "%s"  does  not  define  a  "%s"  attribute/class'  %  (
        dotted_path,  class_name)
      six.reraise(ImportError,  ImportError(msg),  sys.exc_info()[2])
 
 



Clone # 117
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1006
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 961
target  =  model.objects.get(desc='2') target  =  model.objects.get(desc='2')
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'last-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  1,  0),
  ('
3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0),
  ('231',  1,  0)
]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 118
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1165
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1133
target  =  model.objects.get(desc='2') target  =  model.objects.get(desc='22')
model.objects.get(desc='4').move(target,  'last-sibling') model.objects.get(desc='231').move(target,  'first-child')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2, 
1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 119
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1165
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1118
target  =  model.objects.get(desc='2') target  =  model.objects.get(desc='22')
model.objects.get(desc='4').move(target,  'last-sibling') model.objects.get(desc='231').move(target,  'last-child')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2, 
1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 120
Distance between two fragments = 8
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1382
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1367
target  =  model.objects.get(desc='23') target  =  model.objects.get(desc='23')
model.objects.get(desc='4').move(target,  'last-child') model.objects.get(desc='4').move(target,  'first-child')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('231',  3,  0),
  ('
4',  3,  1),
  ('41',  4,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('4',  3,  1),
  ('41',  4,  0),
  ('231',  3
,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected

  assert  self.got(model)  ==  expected



Clone # 121
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1382
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1302
target  =  model.objects.get(desc='23') target  =  model.objects.get(desc='23')
model.objects.get(desc='4').move(target,  'last-child') model.objects.get(desc='4').move(target,  'left')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('231',  3,  0),
  ('4',  3,  1),
  ('41',  4,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected

  assert  self.got(model)  ==  expected



Clone # 122
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1367
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1317
target  =  model.objects.get(desc='23') target  =  model.objects.get(desc='23')
model.objects.get(desc='4').move(target,  'first-child') model.objects.get(desc='4').move(target,  'right')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('4',  3,  1),
  ('41',  4,  0),
  ('23
1',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('
231',  3,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 123
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1367
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1302
target  =  model.objects.get(desc='23') target  =  model.objects.get(desc='23')
model.objects.get(desc='4').move(target,  'first-child') model.objects.get(desc='4').move(target,  'left')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('4',  3
,  1),
  ('41',  4,  0),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('23',  2,  1
),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 124
Distance between two fragments = 3
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1098
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1083
target  =  model.objects.get(desc='22') target  =  model.objects.get(desc='22')
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'left')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('231',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 125
Distance between two fragments = 4
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1098
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1068
target  =  model.objects.get(desc='22') target  =  model.objects.get(desc='22')
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'first-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231
',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('231',  2,  0),
  ('2
1',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 126
Distance between two fragments = 5
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1098
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1036
target  =  model.objects.get(desc='22') target  =  model.objects.get(desc='2')
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'first-child')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231
',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('231',  2,  0),
  ('2
1',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 127
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1098
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 991
target  =  model.objects.get(desc='22') target  =  model.objects.get(desc='2')
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'left')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231
',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4
),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 128
Distance between two fragments = 9
Clone size = 13
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1083
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 976
target  =  model.objects.get(desc='22') target  =  model.objects.get(desc='2')
model.objects.get(desc='231').move(target,  'left') model.objects.get(desc='231').move(target,  'first-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('23
1',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  1,  0),
 
('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 129
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1226
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1166
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='4').move(target,  'last-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 130
Distance between two fragments = 8
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1226
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1134
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='231').move(target,  'first-child')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2, 
1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 131
Distance between two fragments = 8
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1226
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1119
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='231').move(target,  'last-child')
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2, 
1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 132
Distance between two fragments = 7
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1211
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1181
model.objects.get(desc='4').move(target,  'left') model.objects.get(desc='4').move(target,  'left')
expected  =  [('4',  1,  1),
  ('41',  2,  0),
  ('1',  1
,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
 
('4',  1,  1),
  ('41',  2,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 133
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1211
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1151
model.objects.get(desc='4').move(target,  'left') model.objects.get(desc='4').move(target,  'first-sibling')
expected  =  [('4',  1,  1),
  ('41',  2,  0),
  ('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('4',  1,  1),
  ('41',  2,  0),
  ('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 134
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1348
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1288
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='4').move(target,  'last-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 135
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1348
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1256
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='4').move(target,  'last-child')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 136
Distance between two fragments = 3
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1348
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1196
model.objects.get(desc='4').move(target,  'right') model.objects.get(desc='4').move(target,  'right')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  2,  1),
  ('41',  3,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('4',  1,  1),
  ('41',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 137
Distance between two fragments = 2
Clone size = 12
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 251
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 184
  page.save_revision(user=request.user,  submitted_for_moderation=is_submitting)
  page.save_revision(user=request.user,  submitted_for_moderation=is_submitting)
  if  is_publishing:
    messages.success(request,  _("Page  '{0}'  published.").format(page.title))
  elif  is_submitting:
    messages.success(request,  _("Page  '{0}'  submitted  for  moderation.").format(page.title))
    tasks.send_notification.delay(page.get_latest_revision().id,  'submitted',  request.user.id)
  else:
    messages.success(request,  _("Page  '{0}'  updated.").format(page.title))
  if  is_publishing:
    messages.success(request,  _("Page  '{0}'  published.").format(page.title))
  elif  is_submitting:
    messages.success(request,  _("Page  '{0}'  submitted  for  moderation.").format(page.title))
    tasks.send_notification.delay(page.get_latest_revision().id,  'submitted',  request.user.id)
  else:
    messages.success(request,  _("Page  '{0}'  created.").format(page.title))
  for  fn  in  hooks.get_hooks('after_edit_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
  for  fn  in  hooks.get_hooks('after_create_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
return  redirect('wagtailadmin_explore',  page.get_parent().id) return  redirect('wagtailadmin_explore',  page.get_parent().id)



Clone # 138
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1333
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1273
model.objects.get(desc='4').move(target,  'left') model.objects.get(desc='4').move(target,  'first-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('4',  2,  1),
  ('41',  3,  0),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('4',  2,  1),
  ('41',  3,  0),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 139
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1333
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1241
model.objects.get(desc='4').move(target,  'left') model.objects.get(desc='4').move(target,  'first-child')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('4',  2,  1),
  ('41',  3,  0),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('4',  2,  1),
  ('41',  3,  0),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 140
Distance between two fragments = 6
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 454
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 377
  def  test_get_first_sibling(self,  model):
    data  =  [
      ('2',  '1'),
      ('1',  '1'),
      ('4',  '1'),
      ('21',  '21'),
      ('24',  '21'),
      ('22',  '21'),
      ('231',  '231'),
    ]
    for  desc,
  expected  in  data:
      node  =  model.objects.get(desc=desc).get_first_sibling()
      assert  node.desc  ==  expected
  def  test_get_root(self,  model):
    data  =  [
      ('2',  '2'),
      ('1',  '1'),
      ('4',  '4'),
      ('21',  '2'),
      ('24',  '2'),
      ('22',  '2'),
      ('231',  '2'),
    ]
    for  desc,  expected 
in  data:
      node  =  model.objects.
get(desc=desc).get_root()
      assert  node.desc  ==
  expected



Clone # 141
Distance between two fragments = 4
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 454
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 502
  def  test_get_first_sibling(self,  model):
    data  =  [
      ('2',  '1'),
      ('1',  '1'),
      ('4',  '1'),
      ('21',  '21'),
      ('24',  '21'),
      ('22',  '21
'),
      ('231',  '231'),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_first_sibling()
      assert  node.desc  ==  expected
  def  test_get_last_sibling(self,  model):
    data  =  [
      ('2',  '4'),
      ('1',  '4'),
      ('4',  '4'),
      ('21',  '24'),
      ('24',  '24'),
      ('22',  '24
'),
      ('231',  '231'),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_last_sibling()
      assert  node.desc  ==  expected



Clone # 142
Distance between two fragments = 6
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 377
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 502
  def  test_get_root(self,  model):
    data  =  [
      ('2',  '2'),
      ('1',  '1'),
      ('4',  '4'),
      ('21',  '2'),
      ('24',  '2'),
      ('22',  '2
'),
      ('231',  '2'),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_root()
      assert  node.desc  ==  expected
  def  test_get_last_sibling(self,  model):
    data  =  [
      ('2',  '4'),
      ('1',  '4'),
      ('4',  '4'),
      ('21',  '24'),
      ('24',  '24'),
      ('22',  '24
'),
      ('231',  '231'),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_last_sibling()
      assert  node.desc  ==  expected



Clone # 143
Distance between two fragments = 3
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 607
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 593
  def  test_is_descendant_of(self,  model):
    data  =  [
      ('2',  '2',  False),
      ('2',  '1',  False),
      ('21',  '2',  True),
      ('231',  '2',  True),
      ('231',  '23',  True),
      ('231',  '23
1',  False),
    ]
    for  desc1,  desc2,  expected  in  data:
      node1  =  model.objects.get(desc=desc1)
      node2  =  model.objects.get(desc=desc2)
      assert  node1.is_descendant_of(node2)  ==  expected

  def  test_is_child_of(self,  model):
    data  =  [
      ('2',  '2',  False),
      ('2',  '1',  False),
      ('21',  '2',  True),
      ('231',  '2',  False),
      ('231',  '23', 
True),
      ('231',  '231',  False),
    ]
    for  desc1,  desc2,  expected  in  data:
      node1  =  model.objects.get(desc=desc1)
      node2  =  model.objects.get(desc=desc2)
      assert  node1.is_child_of(node2)  ==  expected



Clone # 144
Distance between two fragments = 6
Clone size = 12
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/base.py"
The first line is 22
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 11
  def  reset_index(self):
    return  NotImplemented
  def  reset_index(self):
    pass  #  Not  needed
  def  add_type(self,  model):
    return  NotImplemented
  def  add_type(self,  model):
    pass  #  Not  needed
  def  refresh_index(self):
    return  NotImplemented
  def  refresh_index(self):
    pass  #  Not  needed
  def  add(self,  obj):
    return  NotImplemented
  def  add(self,  obj):
    pass  #  Not  needed
  def  add_bulk(self,  obj_list):
    return  NotImplemented
  def  add_bulk(self,  obj_list):
    pass  #  Not  needed
  def  delete(self,  obj):
    return  NotImplemented
  def  delete(self,  obj):
    pass  #  Not  needed



Clone # 145
Distance between two fragments = 6
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 89
def  model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  mpshort_model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 146
Distance between two fragments = 5
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 833
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 640
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('231',  3,  0),
  ('new',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('25',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected

  assert  self.got(model)  ==  expected



Clone # 147
Distance between two fragments = 4
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 833
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 625
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('231',  3,  0),
  ('new',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  1),
  ('2311',  4,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected

  assert  self.got(model)  ==  expected



Clone # 148
Distance between two fragments = 2
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 799
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 640
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('new',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('25',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 149
Distance between two fragments = 4
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 799
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 625
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('new',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  1),
  ('2311',  4,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 150
Distance between two fragments = 3
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 782
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 640
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('new',  1,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('25',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 151
Distance between two fragments = 5
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 782
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 625
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('new',  1
,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  1),
  ('2311',  4, 
0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 152
Distance between two fragments = 6
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 765
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 640
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('new',  3,  0
),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('25
',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 153
Distance between two fragments = 5
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 765
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 625
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  2),
  ('new',  3,  0
),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  1),
  ('2311',  4
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 154
Distance between two fragments = 8
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 731
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 640
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('new',  2,  0),
  ('
23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('25
',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 155
Distance between two fragments = 7
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 731
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 625
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('new',  2,  0),
  ('
23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  1),
  ('2311',  4
,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 156
Distance between two fragments = 9
Clone size = 12
Source file "../tests/beets/util/bluelet.py"
The first line is 60
Source file "../tests/beets/util/bluelet.py"
The first line is 65
class  ValueEvent(Event):
    """An  event  that  does  nothing  but  return  a  fixed  value."""
    def  __init__(self,  value):
      self.value  =  value
 
class  ExceptionEvent(Event):
    """Raise  an  exception  at  the  yield  point.  Used  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 
class  ExceptionEvent(Event):
    """Raisan  exception  at  the  yield  point.  Used  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 
class  SpawnEvent(Event):
    """Add  a  new  coroutinthread  to  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  SpawnEvent(Event):
    """Ada  new  coroutine  thread  to  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  JoinEvent(Event):
    """Suspenthe  thread  until  the  specified  child  thread  has
    complet
ed.
   
"""
    def  __init__(self,  child):
      self.child  =  child
 
class  JoinEvent(Event):
    """Suspend  the  thread  until  thspecified  child  thread  has
    completed
.
   
"""
    def  __init__(self,  child):
      self.child  =  child
 
class  KillEvent(Event):
    """Unschedula  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 



Clone # 157
Distance between two fragments = 6
Clone size = 12
Source file "../tests/fig/fig/cli/errors.py"
The first line is 22
Source file "../tests/fig/fig/cli/errors.py"
The first line is 13
class  DockerNotFoundUbuntu(UserError):
    def  __init__(self):
      super(DockerNotFoundUbuntu,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
      http://docs.docker.io/en/latest/installation/ubuntulinux/
      """)
 
 
class  DockerNotFoundMac(UserError):
    def  __init__(self):
      super(DockerNotFoundMac,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  docker-osx:
 
      https://github.com/noplay/docker-osx
      """)
 
 
class  DockerNotFoundGeneric(UserError):
    def  __init__(self):
      super(DockerNotFoundGeneric,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
      http://docs.docker.io/en/latest/installation/
      """)
 
 
class  DockerNotFoundUbuntu(UserError):
    def  __init__(self):
      super(DockerNotFoundUbuntu,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
      http://docs.docker.io/en/latest/installation/ubuntulinux/
      """)
 
 
class  ConnectionErrorDockerOSX(UserError):
    def  __init__(self):
      super(ConnectionErrorDockerOSX,  self).__init__("""
      Co
uldn't  connect  to  Docker  daemon  -  you  might  need  to  run  `docker-osx  shell`.
      """)
 
 
class  DockerNotFoundGeneric(UserError):
    def  __init__(self):
      super(DockerNotFoundGeneric,  self).__init__("""
   
  Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
     
http://docs.docker.io/en/latest/installation/
      """)
 
 



Clone # 158
Distance between two fragments = 7
Clone size = 12
Source file "../tests/beets/util/bluelet.py"
The first line is 60
Source file "../tests/beets/util/bluelet.py"
The first line is 75
class  ValueEvent(Event):
    """An  event  that  does  nothing  but  return  a  fixed  value."""
    def  __init__(self,  value):
      self.value  =  value
 
class  JoinEvent(Event):
    """Suspend  the  thread  until  the  specified  child  thread  has
    comp
leted.
   
"""
    def  __init__(self,  child):
      self.child  =  child
 
class  ExceptionEvent(Event):
    """Raise  an  exception  at  the  yield  point.  Used  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 
class  KillEvent(Event):
    """Unschedule  a  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 
class  SpawnEvent(Event):
    """Add  a  new  coroutine  thread  to  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  thread,  start  a  new  thread  and,
    once  the  child  thread  finished,  return  control  to  the  parent
    thread
.
   
"""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  JoinEvent(Event):
    """Suspend  the  thread  until  the  specified  child  thread  has
    complete
d.
    """
    def  __init__(self,  child):
      self.child  =  child
 
class  ReturnEvent(Event):
    """Return  a  value  the  current  thread's  delegator  at  the  point  of
    delegation.  Ends  the 
current  (delegate)  thread.
    """
    def  __init__(self,  value):
      self.value  =  value
 



Clone # 159
Distance between two fragments = 4
Clone size = 12
Source file "../tests/wagtail/wagtail/wagtailcore/rich_text.py"
The first line is 128
Source file "../tests/wagtail/wagtail/wagtailcore/rich_text.py"
The first line is 97
class  DocumentLinkHandler(object):
    @staticmethod
    def  get_db_attributes(tag):
      return  {'id':  tag['data-id']}
 
    @staticmethod
    def  expand_db_attributes(attrs,  for_editor):
      try:
        doc  =  Document.objects.get(id=attrs['id'])
 
        if  for_editor:
          editor_attrs  =  'data-linktype="document"  data-id="%d"  '  %  doc.id
        else:
          editor_attrs  =  ''
 
        return  '<a  %shref="%s">'  %  (editor_attrs,  escape(doc.url))
      except  Document.DoesNotExist:
        return  "<a>"
 
 
class  PageLinkHandler(object):
    """
    PageLinkHandler  will  be  invoked  whenever  we  encounter  an  <a>  element  in  HTML  content
    with  an  attribute  of  data-linktype="page".  The  resulting  element  in  the  database
    representation  will  be:
    <a  linktype="page"  id="42">hello  world</a>
    """
   
@staticmethod
    def  get_db_attributes(tag):
      """
      Given  an  <a>  tag  that  we've  identified  as  a  page  link  embed  (because  it  has  a
      data-linktype="page"  attribute),  return  a  dict  of  the  attributes  we  should
      have  on  the  resulting  <a  linktype="page">  element.
      """
     
return  {'id':  tag['data-id']}
 
    @staticmethod
    def  expand_db_attributes(attrs,  for_editor):
      try:
        page  =  Page.objects.get(id=attrs['id'])
 
        if  for_editor:
          editor_attrs  =  'data-linktype="page"  data-id="%d"  '  %  page.id
        else:
          editor_attrs  =  ''
 
        return  '<a  %shref="%s">'  %  (editor_attrs,  escape(page.url))
      except  Page.DoesNotExist:
        return  "<a>"
 
 



Clone # 160
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2163
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
  assert  '<input  type="hidden"  id="has-filters"  value="0"/>'  in  \
    table_output

  assert  '<input  type="hidden"  id="has-filters"  value="1"/>'  in  \
    table_output



Clone # 161
Distance between two fragments = 9
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1054
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 962
model.objects.get(desc='231').move(target,  'last-sibling') model.objects.get(desc='231').move(target,  'last-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('
3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0),
  ('231',  1,  0)
]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 162
Distance between two fragments = 9
Clone size = 12
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1099
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 977
model.objects.get(desc='231').move(target,  'right') model.objects.get(desc='231').move(target,  'first-sibling')
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231
',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  1,  0),
 
('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 163
Distance between two fragments = 1
Clone size = 12
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 131
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 177
  def  setUp(self):
    #  Create  a  redirect  to  edit
    self.redirect  =  models.Redirect(old_path='/test',  redirect_link='http://www.test.com/')
    self.redirect.save()

    #  Login
    login(self.client)
  def  setUp(self):
    #  Create  a  redirect  to  edit
    self.redirect  =  models.Redirect(old_path='/test',  redirect_link='http://www.test.com/')
    self.redirect.save()

    #  Login
    login(self.client)
  def  get(self,  params={},  redirect_id=None):
    return  self.client.get(reverse('wagtailredirects_edit_redirect',  args=(redirect_id  or  self.redirect.id,  )),  params)
  def  get(self,  params={},  redirect_id=None):
    return  self.client.get(reverse('wagtailredirects_delete_redirect',  args=(redirect_id  or  self.redirect.id,  )),  params)
  def  post(self,  post_data={},  redirect_id=None):
    return  self.client.post(reverse('wagtailredirects_edit_redirect',  args=(redirect_id  or  self.redirect.id,  )),  post_data)
  def  post(self,  post_data={},  redirect_id=None):
    return  self.client.post(reverse('wagtailredirects_delete_redirect',  args=(redirect_id  or  self.redirect.id,  )),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(redirect_id=100000).status_code,  404)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(redirect_id=100000).status_code,  404)



Clone # 164
Distance between two fragments = 9
Clone size = 13
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 88
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 68
  def  test_sort_service_dicts_circular_imports_2(self):
    services  =  [
      {
        'links':  ['postgres',  'redis'],
        'name':  'web'
      },
      {
        'name':  'redis',
        'links':  ['web']
      },
      {
        'name':  'postgres'
      }

    ]

    try:
      sort_service_dicts(services)
    except  DependencyError  as  e:
      self.assertIn('redis',  e.msg)
      self.assertIn('web',  e.msg)
    else:
      self.fail('Should  have  thrown  an  DependencyError')
  def  test_sort_service_dicts_circular_imports(self):
    services  =  [
      {
        'links':  ['redis'],
        'name':  'web'
      },
      {
        'name':  'redis',
        'links':  ['web']
      },
    ]

    try:
      sort_service_dicts(services)
    except  DependencyError  as  e:
      self.assertIn('redis',  e.msg)
      self.assertIn('web',  e.msg)
    else:
      self.fail('Should  have  thrown  an  DependencyError')



Clone # 165
Distance between two fragments = 7
Clone size = 11
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 78
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 127
  if  request.POST:
    doc  =  Document(uploaded_by_user=request.user)
    form  =  DocumentForm(request.POST,  request.FILES,  instance=doc)
    if  form.is_valid():
      form.save()
      messages.success(request,  _("Document  '{0}'  added.").format(doc.title))
      return  redirect('wagtaildocs_index')
    else:
      messages.error(request,  _("The  document  could  not  be  saved  due  to  errors."))
  else:
    form  =  DocumentForm()
  if  request.POST:
    image  =  ImageModel(uploaded_by_user=request.user)
    form  =  ImageForm(request.POST,  request.FILES,  instance=image)
    if  form.is_valid():
      form.save()
      messages.success(request,  _("Image  '{0}'  added.").format(image.title))
      return  redirect('wagtailimages_index')
    else:
      messages.error(request,  _("The  image  could  not  be  created  due  to  errors."))
  else:
    form  =  ImageForm()
  return  render(request,  "wagtaildocs/documents/add.html",  {
    'form':  form,
  })

return  render(request,  "wagtailimages/images/add.html",  {
  'form':  form,
})



Clone # 166
Distance between two fragments = 1
Clone size = 11
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 197
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 229
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  post_data)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 167
Distance between two fragments = 0
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1055
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 168
Distance between two fragments = 0
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1023
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 169
Distance between two fragments = 2
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1008
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  1,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 170
Distance between two fragments = 9
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 963
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('
3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0),
  ('231',  1,  0)
]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 171
Distance between two fragments = 0
Clone size = 11
Source file "../tests/beets/ui/commands.py"
The first line is 382
Source file "../tests/beets/ui/commands.py"
The first line is 233
  if  match.info.data_url:
    print_('URL:\n        %s'  %  match.info.data_url)
if  match.info.data_url:
    print_('URL:\n        %s'  %  match.info.data_url)
 
 
info  =  [] info  =  []
info.append('(Similarity:  %s)'  %  dist_string(match.distance)) info.append('(Similarity:  %s)'  %  dist_string(match.distance))
penalties  =  penalty_string(match.distance) penalties  =  penalty_string(match.distance)
if  penalties:
  info.append(penalties)
if  penalties:
  info.append(penalties)
disambig  =  disambig_string(match.info) disambig  =  disambig_string(match.info)
if  disambig:
  info.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
if  disambig:
  info.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
  print_('  '.join(info))
  print_('  '.join(info))



Clone # 172
Distance between two fragments = 6
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 748
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 245
expected  =  [('new',  10),
  ('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  34),
  ('1',  4,  0),
  ('2',  4,  4),
  ('21',  5,  0),
  ('22',  5,  0),
  ('23',  5,  1),
  ('231',  6,  0),
  ('24',  5,  0),
  ('3',  4,  0),
  ('4',  4,  1),
  ('41',  5,  0)]



Clone # 173
Distance between two fragments = 7
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 714
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 245
expected  =  [('1',  10),
  ('new',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  34),
  ('1',  4,  0),
  ('2',  4,  4),
  ('21',  5,  0),
  ('22',  5,  0),
  ('23',  5,  1),
  ('231',  6,  0),
  ('24',  5,  0),
  ('3',  4,  0),
  ('4',  4,  1),
  ('41',  5,  0)]



Clone # 174
Distance between two fragments = 6
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 680
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 245
expected  =  [('new',  10),
  ('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  34),
  ('1',  4,  0),
  ('2',  4,  4),
  ('21',  5,  0),
  ('22',  5,  0),
  ('23',  5,  1),
  ('231',  6,  0),
  ('24',  5,  0),
  ('3',  4,  0),
  ('4',  4,  1),
  ('41',  5,  0)]



Clone # 175
Distance between two fragments = 7
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1100
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4
),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('231
',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 176
Distance between two fragments = 6
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1085
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4),
  ('2
1',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('2
1',  2,  0),
  ('231',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 177
Distance between two fragments = 5
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1070
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  14),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('231',  20),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 178
Distance between two fragments = 5
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1038
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  14),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('231',  20),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 179
Distance between two fragments = 0
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 993
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 180
Distance between two fragments = 2
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2390
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 978
expected  =  [('1',  1,  0),
  ('231',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('231',  1,  0),
  ('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 181
Distance between two fragments = 3
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 530
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 516
  def  test_get_last_child(self,  model):
    data  =  [
      ('2',  '24'),
      ('21',  None),
      ('23',  '231'),
      ('231',  None),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_last_child()
      if  expected  is  None:
        assert  node  is  None
      else:
        assert  node.desc  ==  expected
  def  test_get_first_child(self,  model):
    data  =  [
      ('2',  '21'),
      ('21',  None),
      ('23',  '231'),
      ('231',  None),
    ]
    for  desc,  expected  in  data:
      node  =  model.objects.get(desc=desc).get_first_child()
      if  expected  is  None:
        assert  node  is  None
      else:
        assert  node.desc  ==  expected



Clone # 182
Distance between two fragments = 9
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1023
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 963
expected  =  [('1',  1,  0),
  ('2',  1,  5),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('231',  2,  0),
  ('
3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0),
  ('231',  1,  0)
]
  assert  self.got(model)  ==  expected
  assert  self.got(model)  ==  expected



Clone # 183
Distance between two fragments = 0
Clone size = 11
Source file "../tests/wagtail/wagtail/wagtaildocs/models.py"
The first line is 18
Source file "../tests/wagtail/wagtail/wagtailimages/models.py"
The first line is 44
created_at  =  models.DateTimeField(auto_now_add=True) created_at  =  models.DateTimeField(auto_now_add=True)
  uploaded_by_user  =  models.ForeignKey(settings.AUTH_USER_MODEL,  null=True,  blank=True,  editable=False)
  uploaded_by_user  =  models.ForeignKey(settings.AUTH_USER_MODEL,  null=True,  blank=True,  editable=False)
  tags  =  TaggableManager(help_text=None,  blank=True,  verbose_name=_('Tags'))
  tags  =  TaggableManager(help_text=None,  blank=True,  verbose_name=_('Tags'))
  indexed_fields  =  {
    'uploaded_by_user_id':  {
      'type':  'integer',
      'store':  'yes',
      'indexed':  'no',
      'boost':  0,
    },
  }
  indexed_fields  =  {
    'uploaded_by_user_id':  {
      'type':  'integer',
      'store':  'yes',
      'indexed':  'no',
      'boost':  0,
    },
  }
  def  __unicode__(self):
    return  self.title
  def  __unicode__(self):
    return  self.title



Clone # 184
Distance between two fragments = 9
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2000
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2018
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
form  =  form_class(
  instance=instance_parent,
  data={
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='2').pk,
    'desc':  instance_parent.desc
  }
)
form  =  form_class(
  instance=saved_instance,
  data={
    '_position':  'first-child',
    '_ref_node_id':  '',
    'desc':  saved_instance.desc
  }
)
assert  form.is_valid() assert  form.is_valid()
saved_instance  =  form.save() restored_instance  =  form.save()
assert  original_count  ==  model.objects.all().count() assert  original_count  ==  model.objects.all().count()
assert  saved_instance.get_children_count()  ==  0 assert  restored_instance.get_children_count()  ==  0



Clone # 185
Distance between two fragments = 9
Clone size = 10
Source file "../tests/fig/tests/cli_test.py"
The first line is 72
Source file "../tests/fig/tests/cli_test.py"
The first line is 68
  self.assertEqual(len(project.get_service('another').containers()),  2)
  self.assertEqual(len(project.get_service('simple').containers()),  1)
self.command.scale({'SERVICE=NUM':  ['simple=1',  'another=1']}) self.command.scale({'SERVICE=NUM':  ['simple=3',  'another=2']})
self.assertEqual(len(project.get_service('simple').containers()),  1) self.assertEqual(len(project.get_service('simple').containers()),  3)
  self.assertEqual(len(project.get_service('another').containers()),  1)
  self.assertEqual(len(project.get_service('another').containers()),  2)
self.command.scale({'SERVICE=NUM':  ['simple=1',  'another=1']}) self.command.scale({'SERVICE=NUM':  ['simple=1',  'another=1']})
self.assertEqual(len(project.get_service('simple').containers()),  1) self.assertEqual(len(project.get_service('simple').containers()),  1)
  self.assertEqual(len(project.get_service('another').containers()),  1)
  self.assertEqual(len(project.get_service('another').containers()),  1)
self.command.scale({'SERVICE=NUM':  ['simple=0',  'another=0']}) self.command.scale({'SERVICE=NUM':  ['simple=1',  'another=1']})
self.assertEqual(len(project.get_service('simple').containers()),  0) self.assertEqual(len(project.get_service('simple').containers()),  1)
self.assertEqual(len(project.get_service('another').containers()),  0)   self.assertEqual(len(project.get_service('another').containers()),  1)



Clone # 186
Distance between two fragments = 6
Clone size = 10
Source file "../tests/beets/dbcore/types.py"
The first line is 101
Source file "../tests/beets/dbcore/types.py"
The first line is 56
class  Float(Type):
    """A  basic  floating-point  type.
    """
    sql  =  u'REAL'
    query  =  query.NumericQuery
 
    def  format(self,  value):
      return  u'{0:.1f}'.format(value  or  0.0)
 
    def  parse(self,  string):
      try:
        return  float(string)
      except  ValueError:
        return  0.0
 
 
class  Integer(Type):
    """A  basic  integer  type.
    """
    sql  =  u'INTEGER'
    query  =  query.NumericQuery
 
    def  format(self,  value):
      return  unicode(value  or  0)
 
    def  parse(self,  string):
      try:
        return  int(string)
      except  ValueError:
        return
  0
 
 



Clone # 187
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1464
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1491
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') sorted_model.add_root(val1=3,  val2=2,  desc='vcx')
root_nodes  =  sorted_model.get_root_nodes() root_nodes  =  sorted_model.get_root_nodes()
target  =  root_nodes[0] target  =  root_nodes[0]



Clone # 188
Distance between two fragments = 3
Clone size = 10
Source file "../tests/beets/mediafile.py"
The first line is 136
Source file "../tests/beets/mediafile.py"
The first line is 98
  if  val  is  None:
    return  0.0
  elif  isinstance(val,  int)  or  isinstance(val,  float):
    return  float(val)
  else:

    if  not  isinstance(val,  basestring):
      val  =  unicode(val)
    val  =  re.match(r'[\+-]?[0-9\.]*',  val.strip()).group(0)
    if  not  val:
      return  0.0
    else:
      return  float(val)
  if  val  is  None:
    return  0
  elif  isinstance(val,  int)  or  isinstance(val,  float):
    #  Just  a  number.
    return  int(val)
  else:
    #  Process  any  other  type  as  a  string.

    if  not  isinstance(val,  basestring):
      val  =  unicode(val)
    #  Get  a  number  from  the  front  of  the  string.
   
val  =  re.match(r'[0-9]*',  val.strip()).group(0)
    if  not  val:
      return  0
    else:
      return  int(val)



Clone # 189
Distance between two fragments = 3
Clone size = 10
Source file "../tests/wagtail/wagtail/wagtailadmin/hooks.py"
The first line is 17
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 77
_searched_for_hooks  =  False
 
 
_searched_for_image_formats  =  False
 
 
def  search_for_hooks():
    global  _searched_for_hooks
    if  not  _searched_for_hook
s:
      for  app_module  in  settings.INSTALLED_APPS:
        try:
          import_module('%s.wagtail_hooks'  %  app_module)
        except  ImportError:
          continue
 
      _searched_for_hooks  =  True
 
 
def  search_for_image_formats():
    global  _searched_for_image_formats
    if  not  _searched_for_image_format
s:
      for  app_module  in  settings.INSTALLED_APPS:
        try:
          import_module('%s.image_formats'  %  app_module)
        except  ImportError:
          continue
 
      _searched_for_image_formats  =  True
 
 



Clone # 190
Distance between two fragments = 5
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 94
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
def  mpshortnotsorted_model(request):
    return  _prepare_db_test(request)
 
 
def  model(request):
    return  _prepare_db_test(request)
 
 
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 
def  related_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 191
Distance between two fragments = 4
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 147
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 252
  def  get_first_root_node(cls):
    """
    :returns:

      The  first  root  node  in  the  tree  or  ``None``  if  it  iempty.
    """
    try:
      return  cls.get_root_nodes()[0]
    except  IndexError:
      return  None
  def  get_first_child(self):
    """
    :returns:

      The  leftmost  node's  child,  or  None  if  it  hano  children.
    """
    try:
      return  self.get_children()[0]
    except  IndexError:
      return  None
  def  get_last_root_node(cls):
    """
    :returns:

      The  last  root  node  in  the  tree  or  ``None``  if  it  is  empty.
    """
    try
:
      return  cls.get_root_nodes().reverse()[0]
    except  IndexError:
      return  None
  def  get_last_child(self):
    """
    :returns:

      The  rightmost  node's  child,  or  None  if  it  has  no  children.
    """
    tr
y:
      return  self.get_children().reverse()[0]
    except  IndexError:
      return  None



Clone # 192
Distance between two fragments = 9
Clone size = 11
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 27
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 7
  services  =  [
    {
      'links':  ['redis',  'postgres'],
      'name':  'web'
    },
    {
      'name':  'postgres',
      'links':  ['redis']

    },
    {
      'name':  'redis'
    }
  ]
  services  =  [
    {
      'links':  ['redis'],
      'name':  'web'
    },
    {
      'name':  'grunt'
    },
    {
      'name':  'redis'
    }
  ]
sorted_services  =  sort_service_dicts(services) sorted_services  =  sort_service_dicts(services)
self.assertEqual(len(sorted_services),  3) self.assertEqual(len(sorted_services),  3)
self.assertEqual(sorted_services[0]['name'],  'redis') self.assertEqual(sorted_services[0]['name'],  'grunt')
self.assertEqual(sorted_services[1]['name'],  'postgres') self.assertEqual(sorted_services[1]['name'],  'redis')
  self.assertEqual(sorted_services[2]['name'],  'web')
  self.assertEqual(sorted_services[2]['name'],  'web')



Clone # 193
Distance between two fragments = 4
Clone size = 10
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 23
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=2,
  description="Last  editors  pick",
)
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=0,
  description="First  editors  pick",
)
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=1,
    description="Middle  editors  pick",
  )
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=2,
  description="Last  editors  pick",
)



Clone # 194
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 314
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 300
  if  target.is_descendant_of(self):
    raise  InvalidMoveToDescendant(
      _("Can't  move  node  to  a  descendant."))
  if  target.is_descendant_of(self):
    raise  InvalidMoveToDescendant(
      _("Can't  move  node  to  a  descendant."))
  if  self  ==  target  and  (
    (pos  ==  'left')  or
    (pos  in  ('right',  'last-sibling')  and
      target  ==  target.get_last_sibling())  or
    (pos  ==  'first-sibling'  and
      target  ==  target.get_first_sibling())):
    #  special  cases,  not  actually  moving  the  node  so  no  need  to  UPDATE
    return
  if  self  ==  target  and  (
    (pos  ==  'left')  or
    (pos  in  ('right',  'last-sibling')  and
      target  ==  target.get_last_sibling())  or
    (pos  ==  'first-sibling'  and
      target  ==  target.get_first_sibling())):
    #  special  cases,  not  actually  moving  the  node  so  no  need  to  UPDATE
    return



Clone # 195
Distance between two fragments = 1
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 42
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1227
UNCHANGED  =  [
   
('1',  1,  0),
    ('2',  1,  4),
    ('21',  2,  0),
    ('22',  2,  0),
    ('23',  2,  1),
    ('231',  3,  0),
    ('24',  2,  0),
    ('3',  1,  0),
    ('4',  1,  1),
    ('41',  2,  0)]
 
 
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]



Clone # 196
Distance between two fragments = 1
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 42
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1167
UNCHANGED  =  [
   
('1',  1,  0),
    ('2',  1,  4),
    ('21',  2,  0),
    ('22',  2,  0),
    ('23',  2,  1),
    ('231',  3,  0),
    ('24',  2,  0),
    ('3',  1,  0),
    ('4',  1,  1),
    ('41',  2,  0)]
 
 
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  0),
  ('23',  2,  1),
  ('231',  3,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]



Clone # 197
Distance between two fragments = 7
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 42
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1135
UNCHANGED  =  [
   
('1',  1,  0),
    ('2',  1,  4),
    ('21',  2,  0),
    ('22',  2,  0),
    ('23',  2, 
1),
    ('231',  3,  0),
    ('24',  2,  0),
    ('3',  1,  0),
    ('4',  1,  1),
    ('41',  2,  0)]
 
 
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]



Clone # 198
Distance between two fragments = 7
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 42
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1120
UNCHANGED  =  [
   
('1',  1,  0),
    ('2',  1,  4),
    ('21',  2,  0),
    ('22',  2,  0),
    ('23',  2, 
1),
    ('231',  3,  0),
    ('24',  2,  0),
    ('3',  1,  0),
    ('4',  1,  1),
    ('41',  2,  0)]
 
 
expected  =  [('1',  1,  0),
  ('2',  1,  4),
  ('21',  2,  0),
  ('22',  2,  1),
  ('231',  3,  0),
  ('23',  2,  0),
  ('24',  2,  0),
  ('3',  1,  0),
  ('4',  1,  1),
  ('41',  2,  0)]



Clone # 199
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/wagtailembeds/embeds.py"
The first line is 104
Source file "../tests/wagtail/wagtail/wagtailembeds/embeds.py"
The first line is 67
  if  oembed['type']  ==  'photo':
    html  =  '<img  src="%s"  />'  %  (oembed['url'],  )
  else:
    html  =  oembed.get('html')
  if  oembed['type']  ==  'photo':
    html  =  '<img  src="%s"  />'  %  (oembed['url'],  )
  else:
    html  =  oembed.get('html')
  return  {
    'title':  oembed['title'],
    'type':  oembed['type'],
    'thumbnail_url':  oembed.get('thumbnail_url'),
    'width':  oembed.get('width'),
    'height':  oembed.get('height'),
    'html':  html,
  }

  return  {
    'title':  oembed['title'],
    'type':  oembed['type'],
    'thumbnail_url':  oembed.get('thumbnail_url'),
    'width':  oembed.get('width'),
    'height':  oembed.get('height'),
    'html':  html,
  }



Clone # 200
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2277
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 201
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2277
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 202
Distance between two fragments = 9
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2248
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request,
  'action_form':  True
})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 203
Distance between two fragments = 9
Clone size = 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2248
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request,
  'action_form':  True
})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 204
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2225
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
  table_output  =  self.template.render(context)
table_output  =  self.template.render(context)



Clone # 205
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2225
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
  table_output  =  self.template.render(context)
table_output  =  self.template.render(context)



Clone # 206
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2131
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 207
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2131
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 208
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2096
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2195
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 209
Distance between two fragments = 0
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2096
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2179
list_display  =  m.get_list_display(request) list_display  =  m.get_list_display(request)
list_display_links  =  m.get_list_display_links(request,  list_display) list_display_links  =  m.get_list_display_links(request,  list_display)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl  =  ChangeList(request,  model,  list_display,  list_display_links,
  m.list_filter,  m.date_hierarchy,  m.search_fields,
  m.list_select_related,  m.list_per_page,
  m.list_max_show_all,  m.list_editable,  m)
cl.formset  =  None cl.formset  =  None
context  =  Context({'cl':  cl,
  'request':  request})
context  =  Context({'cl':  cl,
  'request':  request})
table_output  =  self.template.render(context) table_output  =  self.template.render(context)



Clone # 210
Distance between two fragments = 7
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1967
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1960
instance_grandchild  =  model.objects.get(desc='22') instance_child  =  model.objects.get(desc='21')
form  =  form_class(instance=instance_grandchild) form  =  form_class(instance=instance_child)
  assert  form._get_position_ref_node(instance_grandchild)  ==  {
    '_position':  'right',
    '_ref_node_id':  model.objects.get(desc='21').pk
  }
  assert  form._get_position_ref_node(instance_child)  ==  {
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='2').pk
  }
instance_grandchild  =  model.objects.get(desc='231') instance_grandchild  =  model.objects.get(desc='22')
form  =  form_class(instance=instance_grandchild) form  =  form_class(instance=instance_grandchild)
  assert  form._get_position_ref_node(instance_grandchild)  ==  {
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='23').pk
  }
  assert  form._get_position_ref_node(instance_grandchild)  ==  {
    '_position':  'right',
    '_ref_node_id':  model.objects.get(desc='21').pk
  }



Clone # 211
Distance between two fragments = 4
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 3
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 3
import  sys import  sys
import  operator
 
import  operator
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
from  django.core  import  serializers from  django.core  import  serializers
from  django.db  import  connection,  models,  transaction from  django.db  import  models,  transaction,  connection
from  django.db.models  import  Q from  django.db.models  import  F,  Q
from  django.utils.translation  import  ugettext_noop  as  _
 
from  django.utils.translation  import  ugettext_noop  as  _
 
from  treebeard.exceptions  import  InvalidMoveToDescendant from  treebeard.numconv  import  NumConv
from  treebeard.models  import  Node
 
 
from  treebeard.models  import  Node



Clone # 212
Distance between two fragments = 8
Clone size = 10
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 126
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 106
def  delete(request,  document_id):
    doc  =  get_object_or_404(Document,  id=document_id)
 
    if  not  doc.is_editable_by_user(request.user):
      raise  PermissionDenied
 
    if  request.POST:
      doc.delete()
      messages.success(request,  _("Document  '{0}'  deleted.").format(doc.title))
      return  redirec
t('wagtaildocs_index')
 
    return  render(request,  "wagtaildocs/documents/confirm_delete.html",  {
      'document':  doc,
    })
def  delete(request,  image_id):
    image  =  get_object_or_404(get_image_model(),  id=image_id)
 
    if  not  image.is_editable_by_user(request.user):
      raise  PermissionDenied
 
    if  request.POST:
      image.delete()
      messages.success(request,  _("Image  '{0}'  deleted.").format(image.title))
      return  redire
ct('wagtailimages_index')
 
    return  render(request,  "wagtailimages/images/confirm_delete.html",  {
      'image':  image,
    })
 
 



Clone # 213
Distance between two fragments = 6
Clone size = 12
Source file "../tests/fig/tests/split_buffer_test.py"
The first line is 15
Source file "../tests/fig/tests/split_buffer_test.py"
The first line is 7
  def  test_no_end_separator(self):
    def  reader():
      yield  "abc\n"
      yield  "def\n"
      yield  "ghi"

    self.assertEqual(list(split_buffer(reader(),  '\n')),  ["abc\n",  "def\n",  "ghi"])
  def  test_single_line_chunks(self):
    def  reader():
      yield  "abc\n"
      yield  "def\n"
      yield  "ghi\n"

    self.assertEqual(list(split_buffer(reader(),  '\n')),  ["abc\n",  "def\n",  "ghi\n"])
  def  test_multiple_line_chunk(self):
    def  reader():
      yield  "abc\ndef\nghi"

    self.assertEqual(list(split_buffer(reader(),  '\n')),  ["abc\n",  "def\n",  "ghi"])
  def  test_no_end_separator(self):
    def  reader():
      yield  "abc\n"
      yield  "
def\n"
      yield  "
ghi"

    self.assertEqual(list(split_buffer(reader(),  '\n')),  ["abc\n",  "def\n",  "ghi"])



Clone # 214
Distance between two fragments = 2
Clone size = 10
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 58
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 77
  searchform  =  SearchForm()
  searchform  =  SearchForm()
documents  =  Document.objects.order_by('-created_at') images  =  Image.objects.order_by('-created_at')
p  =  request.GET.get("p",  1) p  =  request.GET.get("p",  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(images,  10)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 215
Distance between two fragments = 7
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 82
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 43
  response  =  self.post({
    'username':  "testuser",
    'email':  "test@user.com",
    'first_name':  "Edited",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
  response  =  self.post({
    'username':  "testuser",
    'email':  "test@user.com",
    'first_name':  "Test",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
  self.assertEqual(response.status_code,  302)
  self.assertEqual(response.status_code,  302)
user  =  User.objects.get(id=self.test_user.id) users  =  User.objects.filter(username='testuser')



Clone # 216
Distance between two fragments = 4
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.exceptions  import  PermissionDenied from  django.core.exceptions  import  PermissionDenied
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailimages.models  import  get_image_model from  wagtail.wagtaildocs.models  import  Document
from  wagtail.wagtailimages.forms  import  get_image_form
 
 
from  wagtail.wagtaildocs.forms  import  DocumentForm
 
 



Clone # 217
Distance between two fragments = 4
Clone size = 9
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/docs/conf.py"
The first line is 35
Source file "../tests/wagtail/docs/conf.py"
The first line is 42
templates_path  =  ['_templates'] templates_path  =  ['_templates']
 
source_suffix  =  '.rst' source_suffix  =  '.rst'
 
master_doc  =  'index' master_doc  =  'index'
 
project  =  'django-treebeard' project  =  u'Wagtail  Documentation'
copyright  =  '2008-2013Gustavo  Picon' copyright  =  u'2014Torchbox'
 
version  =  '2.0b2' version  =  '0.1'
release  =  '2.0b2' release  =  '0.1'
 
exclude_trees  =  ['_build'] exclude_patterns  =  ['_build']
 
pygments_style  =  'sphinx' pygments_style  =  'sphinx'
 



Clone # 218
Distance between two fragments = 8
Clone size = 9
Source file "../tests/beets/util/bluelet.py"
The first line is 60
Source file "../tests/beets/util/bluelet.py"
The first line is 70
class  ValueEvent(Event):
    """An  event  that  does  nothing  but  return  a  fixed  value."""
    def  __init__(self,  value):
      self.value  =  value
 
class  SpawnEvent(Event):
    """Add  a  new  coroutine  threato  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  ExceptionEvent(Event):
    """Raise  an  exception  at  the  yield  point.  Used  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 
class  JoinEvent(Event):
    """Suspend  the  thread  until  the  specified  child  thread  has
    com
pleted.
    """
    def  __init__(self,  child):
      self.child  =  child
 
class  SpawnEvent(Event):
    """Add  a  new  coroutine  thread  to  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  KillEvent(Event):
    """Unschedule  a  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 



Clone # 219
Distance between two fragments = 8
Clone size = 9
Source file "../tests/beets/util/bluelet.py"
The first line is 60
Source file "../tests/beets/util/bluelet.py"
The first line is 82
class  ValueEvent(Event):
    """An  event  that  does  nothing  but  return  a  fixed  value."""
    def  __init__(self,  value):
      self.value  =  value
 
class  KillEvent(Event):
    """Unschedule  a  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 
class  ExceptionEvent(Event):
    """Raise  an  exception  at  the  yield  point.  Used  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  thread,  start  a  new  thread  and,
    once  the  child  thread  finished,  return  control  to  the 
parent
    thread
.
   
"""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  SpawnEvent(Event):
    """Add  a  new  coroutine  thread  to  the  scheduler."""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  ReturnEvent(Event):
    """Return  a  value  the  current  thread's  delegator  at  the  point  of
    delegation.  Ends  the 
current  (delegate)  thread.
   
"""
    def  __init__(self,  value):
      self.value  =  value
 



Clone # 220
Distance between two fragments = 2
Clone size = 9
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1479
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1412
expected  =  [(1,  4,  'bcd',  1,  7),
  (2,  2,  'qwe',  2,  0),
  (2,  5,  'zxy',  2,  0),
  (3,  2,  'vcx',  2,  0),
  (3,  3,  'abc',  2,  0),
  (3,  3,  'abc',  2,  0),
  (3,  3,  'zxy',  2,  0),
  (4,  1,  'fgh',  2,  0)]
expected  =  [(1,  4,  'bcd',  1,  0),
  (2,  2,  'qwe',  1,  0),
  (2,  5,  'zxy',  1,  0),
  (3,  2,  'vcx',  1,  0),
  (3,  3,  'abc',  1,  0),
  (3,  3,  'abc',  1,  0),
  (3,  3,  'zxy',  1,  0),
  (4,  1,  'fgh',  1,  0)]
  assert  self.got(sorted_model)  ==  expected
  assert  self.got(sorted_model)  ==  expected



Clone # 221
Distance between two fragments = 9
Clone size = 9
Source file "../tests/fig/fig/packages/six.py"
The first line is 222
Source file "../tests/fig/fig/packages/six.py"
The first line is 209
_meth_func  =  "im_func" _meth_func  =  "__func__"
  _meth_self  =  "im_self"
  _meth_self  =  "__self__"
_func_closure  =  "func_closure" _func_closure  =  "__closure__"
_func_code  =  "func_code" _func_code  =  "__code__"
_func_defaults  =  "func_defaults" _func_defaults  =  "__defaults__"
  _func_globals  =  "func_globals"
  _func_globals  =  "__globals__"
_iterkeys  =  "iterkeys" _iterkeys  =  "keys"
_itervalues  =  "itervalues" _itervalues  =  "values"
_iteritems  =  "iteritems" _iteritems  =  "items"



Clone # 222
Distance between two fragments = 2
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 96
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 81
class  TestEditorsPicksDeleteView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  an  editors  pick  to  delete
      self.query  =  models.Query.get("Hello")
      self.query.editors_picks.create(page_id=1,  description="Root  page")
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/'  +  str(self.query.id)  +  '/delete/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestEditorsPicksEditView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  an  editors  pick  to  edit
      self.query  =  models.Query.get("Hello")
      self.query.editors_picks.create(page_id=1,  description="Root  page")
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/'  +  str(self.query.id)  +  '/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 223
Distance between two fragments = 0
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 60
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 38
documents  =  Document.objects.order_by('-created_at')   documents  =  Document.objects.order_by('-created_at')
p  =  request.GET.get("p",  1) p  =  request.GET.get("p",  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(documents,  10)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 224
Distance between two fragments = 2
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 60
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 57
documents  =  Document.objects.order_by('-created_at') images  =  Image.objects.order_by('-created_at')
p  =  request.GET.get("p",  1) p  =  request.GET.get("p",  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(images,  10)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 225
Distance between two fragments = 2
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 79
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 38
images  =  Image.objects.order_by('-created_at')   documents  =  Document.objects.order_by('-created_at')
p  =  request.GET.get("p",  1) p  =  request.GET.get("p",  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(documents,  10)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 226
Distance between two fragments = 0
Clone size = 9
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 79
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 57
images  =  Image.objects.order_by('-created_at') images  =  Image.objects.order_by('-created_at')
p  =  request.GET.get("p",  1) p  =  request.GET.get("p",  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(images,  10)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 227
Distance between two fragments = 5
Clone size = 9
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 92
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 80
class  AL_UnicodeNode(AL_Node):
    parent  =  models.ForeignKey('self',
        related_name='children_set',
        null=True,
        db_index=True)
    sib_order  =  models.PositiveIntegerField()
    desc  =  models.CharField(max_length=255)
 
    def  __str__(self):    #  pragma:  no  cover
      return  self.desc
 
 
class  AL_TestNode(AL_Node):
    parent  =  models.ForeignKey('self',
        related_name='children_set',
        null=True,
        db_index=True)
    sib_order  =  models.PositiveIntegerField()
    desc  =  models.CharField(max_length=255)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 



Clone # 228
Distance between two fragments = 0
Clone size = 9
Source file "../tests/beets/util/pipeline.py"
The first line is 274
Source file "../tests/beets/util/pipeline.py"
The first line is 229
  with  self.abort_lock:
    if  self.abort_flag:
      return
  with  self.abort_lock:
    if  self.abort_flag:
      return
msg  =  self.in_queue.get() msg  =  self.in_queue.get()
  if  msg  is  POISON:
    break
  if  msg  is  POISON:
    break
  with  self.abort_lock:
    if  self.abort_flag:
      return
  with  self.abort_lock:
    if  self.abort_flag:
      return



Clone # 229
Distance between two fragments = 9
Clone size = 9
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/beets/library.py"
The first line is 17
import  ConfigParser import  os
import  codecs import  re
import  yaml import  sys
import  logging import  logging
import  time import  shlex
import  itertools import  unicodedata
import  re
 
import  traceback
import  beets import  time
from  beets  import  util from  unidecode  import  unidecode



Clone # 230
Distance between two fragments = 3
Clone size = 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 377
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 269
  if  pos  ==  'last-sibling':
    newpos  =  target.get_parent().rgt
    sql,  params  =  move_right(target.tree_id,  newpos,  False,  gap)
  elif  pos  ==  'first-sibling':
    newpos  =  target.lft
    sql,  params  =  move_right(target.tree_id,
   
  newpos  -  1,  False,  gap)
  elif  pos  ==  'left':
    newpos  =  target.lft
    sql,  params  =  move_right(target.tree_id,  newpos,  True,  gap)
  if  pos  ==  'last-sibling':
    newpos  =  target.get_parent().rgt
    sql,  params  =  move_right(target.tree_id,  newpos,  False,  2)
  elif  pos  ==  'first-sibling':
    newpos  =  target.lft
    sql,  params  =  move_right(target.tree_id,  newpos  -  1,  False,  2)
  elif  pos  ==  'left':
    newpos  =  target.lft
    sql,  params  =  move_right(target.tree_id,  newpos,  True,  2)



Clone # 231
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 100
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 82
  response  =  self.post({
    'username':  "",
    'email':  "test@user.com",
    'first_name':  "Teset",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
  response  =  self.post({
    'username':  "testuser",
    'email':  "test@user.com",
    'first_name':  "Edited",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
self.assertEqual(response.status_code,  200)   self.assertEqual(response.status_code,  302)



Clone # 232
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 100
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 43
  response  =  self.post({
    'username':  "",
    'email':  "test@user.com",
    'first_name':  "Teset",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
  response  =  self.post({
    'username':  "testuser",
    'email':  "test@user.com",
    'first_name':  "Test",
    'last_name':  "User",
    'password1':  "password",
    'password2':  "password",
  })
self.assertEqual(response.status_code,  200)   self.assertEqual(response.status_code,  302)



Clone # 233
Distance between two fragments = 8
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 35
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 33
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path
if  bad_alpha:
  print  "Invalid  characters  found  in  path  for  pages:  %r"  %  bad_alpha
if  orphans:
  print  "Orphaned  pages  found:  %r"  %  orphans
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  orphans:
  print  "Orphaned  pages  found:  %r"  %  orphans
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth



Clone # 234
Distance between two fragments = 8
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 83
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 73
self.assertEqual(popular_queries[1],  models.Query.get("little  popular  query")) self.assertEqual(popular_queries[0],  models.Query.get("popular  query"))
  self.assertEqual(popular_queries[2],  models.Query.get("unpopular  query"))
  self.assertEqual(popular_queries[1],  models.Query.get("unpopular  query"))
  for  i  in  range(20):
    models.Query.get("unpopular  query").add_hit()
  for  i  in  range(5):
    models.Query.get("little  popular  query").add_hit()
self.assertEqual(popular_queries.count(),  3) self.assertEqual(popular_queries.count(),  3)
self.assertEqual(popular_queries[0],  models.Query.get("unpopular  query")) self.assertEqual(popular_queries[0],  models.Query.get("popular  query"))
self.assertEqual(popular_queries[1],  models.Query.get("popular  query")) self.assertEqual(popular_queries[1],  models.Query.get("little  popular  query"))
  self.assertEqual(popular_queries[2],  models.Query.get("little  popular  query"))
  self.assertEqual(popular_queries[2],  models.Query.get("unpopular  query"))



Clone # 235
Distance between two fragments = 8
Clone size = 8
Source file "../tests/fig/tests/service_test.py"
The first line is 12
Source file "../tests/fig/tests/service_test.py"
The first line is 10
self.assertRaises(ConfigError,  lambda:  Service(name='  '))   self.assertRaises(ConfigError,  lambda:  Service(name=''))
self.assertRaises(ConfigError,  lambda:  Service(name='/')) self.assertRaises(ConfigError,  lambda:  Service(name='  '))
self.assertRaises(ConfigError,  lambda:  Service(name='!')) self.assertRaises(ConfigError,  lambda:  Service(name='/'))
self.assertRaises(ConfigError,  lambda:  Service(name='\xe2')) self.assertRaises(ConfigError,  lambda:  Service(name='!'))
self.assertRaises(ConfigError,  lambda:  Service(name='_')) self.assertRaises(ConfigError,  lambda:  Service(name='\xe2'))
self.assertRaises(ConfigError,  lambda:  Service(name='____')) self.assertRaises(ConfigError,  lambda:  Service(name='_'))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar')) self.assertRaises(ConfigError,  lambda:  Service(name='____'))
  self.assertRaises(ConfigError,  lambda:  Service(name='__foo_bar__'))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar'))



Clone # 236
Distance between two fragments = 8
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/settings.py"
The first line is 52
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/docs/conf.py"
The first line is 26
INSTALLED_APPS  =  [
    'django.contrib.auth',
    'django.contrib.contenttype
s',
    'django.contrib.sessions',
    'django.contrib.admin',
    'django.contrib.messages',
    'treebeard',
    'treebeard.tests']
 
extensions  =  [
  'djangodocs',
  'sphinx.ext.autodoc',
  'sphinx.ext.coverage',
  'sphinx.ext.graphviz',
  'sphinx.ext.inheritance_diagram',
  'sphinx.ext.todo',
  'sphinx.ext.intersphinx',
]



Clone # 237
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 367
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 434
  def  test_is_leaf(self,  model):
    data  =  [
      ('2',  False),
      ('23',  False),
      ('231',  True),
    ]
    for  desc,  expected  in  data:
      got  =  model.objects.get(desc=desc).is_leaf()
      assert  got  ==  expected
  def  test_get_children_count(self,  model):
    data  =  [
      ('2',  4),
      ('23',  1),
      ('231',  0),
    ]
    for  desc,  expected  in  data:
      got  =  model.objects.get(desc=desc).get_children_count()
      assert  got  ==  expected



Clone # 238
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 94
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 80
class  TestDocumentDeleteView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  delete
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_delete_document',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 
class  TestDocumentEditView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  edit
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_edit_document',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 239
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 94
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 130
class  TestDocumentDeleteView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  delete
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_delete_document',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 
class  TestDocumentChooserChosenView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  choose
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_document_chosen',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 240
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 80
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 130
class  TestDocumentEditView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  edit
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_edit_document',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 
class  TestDocumentChooserChosenView(TestCase):
    def  setUp(self):
      login(self.client)
 
      #  Create  a  document  to  choose
      self.document  =  models.Document.objects.create(title="Test  document")
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_document_chosen',  args=(self.document.id,)),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 241
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 16
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 26
  root  =  orm['wagtailcore.page'].objects.create(
    title="Root",
    slug='root',
    content_type=page_content_type,
    path='0001',
    depth=1,
    numchild=1,
    url_path='/',
  )
  homepage  =  orm['wagtailcore.page'].objects.create(
    title="Welcome  to  your  new  Wagtail  site!",
    slug='home',
    content_type=page_content_type,
    path='00010001',
    depth=2,
    numchild=0,
    url_path='/home/',
  )



Clone # 242
Distance between two fragments = 0
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1404
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1916
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx')   sorted_model.add_root(val1=3,  val2=2,  desc='vcx')



Clone # 243
Distance between two fragments = 0
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1404
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1491
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') sorted_model.add_root(val1=3,  val2=2,  desc='vcx')



Clone # 244
Distance between two fragments = 0
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1404
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1464
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') sorted_model.add_root(val1=3,  val2=2,  desc='vcx')



Clone # 245
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1404
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1424
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') root.add_child(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') root.add_child(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') root.add_child(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') root.add_child(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') root.add_child(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') root.add_child(val1=3,  val2=2,  desc='vcx')



Clone # 246
Distance between two fragments = 0
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1916
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1491
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
  sorted_model.add_root(val1=3,  val2=2,  desc='vcx')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx')



Clone # 247
Distance between two fragments = 0
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1916
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1464
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') sorted_model.add_root(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') sorted_model.add_root(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') sorted_model.add_root(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') sorted_model.add_root(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') sorted_model.add_root(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') sorted_model.add_root(val1=2,  val2=2,  desc='qwe')
  sorted_model.add_root(val1=3,  val2=2,  desc='vcx')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx')



Clone # 248
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1916
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1424
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') root.add_child(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') root.add_child(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') root.add_child(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') root.add_child(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') root.add_child(val1=2,  val2=2,  desc='qwe')
  sorted_model.add_root(val1=3,  val2=2,  desc='vcx')
root.add_child(val1=3,  val2=2,  desc='vcx')



Clone # 249
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1491
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1424
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') root.add_child(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') root.add_child(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') root.add_child(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') root.add_child(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') root.add_child(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') root.add_child(val1=3,  val2=2,  desc='vcx')



Clone # 250
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1464
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1424
sorted_model.add_root(val1=3,  val2=3,  desc='zxy') root.add_child(val1=3,  val2=3,  desc='zxy')
sorted_model.add_root(val1=1,  val2=4,  desc='bcd') root.add_child(val1=1,  val2=4,  desc='bcd')
sorted_model.add_root(val1=2,  val2=5,  desc='zxy') root.add_child(val1=2,  val2=5,  desc='zxy')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=4,  val2=1,  desc='fgh') root.add_child(val1=4,  val2=1,  desc='fgh')
sorted_model.add_root(val1=3,  val2=3,  desc='abc') root.add_child(val1=3,  val2=3,  desc='abc')
sorted_model.add_root(val1=2,  val2=2,  desc='qwe') root.add_child(val1=2,  val2=2,  desc='qwe')
sorted_model.add_root(val1=3,  val2=2,  desc='vcx') root.add_child(val1=3,  val2=2,  desc='vcx')



Clone # 251
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 44
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 42
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='edit')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='add')
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=moderators_group,  page=root,  permission_type='publish')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='edit')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=editors_group,  page=root,  permission_type='add')
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=moderators_group,  page=root,  permission_type='publish')
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=editors_group,  page=root,  permission_type='edit')

orm['wagtailcore.grouppagepermission'].objects.create(
  group=editors_group,  page=root,  permission_type='add')



Clone # 252
Distance between two fragments = 7
Clone size = 8
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
from  __future__  import  print_function
 
from  __future__  import  print_function
import  logging import  sys
import  os import  tty
import  time import  fcntl
import  itertools import  os
import  codecs import  termios
import  platform
 
import  threading
import  beets import  errno
 



Clone # 253
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/edit_handlers.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailimages/edit_handlers.py"
The first line is 1
from  wagtail.wagtailadmin.edit_handlers  import  BaseChooserPanel
 
 
from  wagtail.wagtailadmin.edit_handlers  import  BaseChooserPanel
 
 
class  BaseDocumentChooserPanel(BaseChooserPanel):
    field_template  =  "wagtaildocs/edit_handlers/document_chooser_panel.html"
    object_type_name  =  "document"
    js_function_name  =  "createDocumentChooser"
 
 
class  BaseImageChooserPanel(BaseChooserPanel):
    field_template  =  "wagtailimages/edit_handlers/image_chooser_panel.html"
    object_type_name  =  "image"
    js_function_name  =  "createImageChooser"
 
 
def  DocumentChooserPanel(field_name):
  return  type('_DocumentChooserPanel',  (BaseDocumentChooserPanel,),  {
    'field_name':  field_name,
  })
def  ImageChooserPanel(field_name):
  return  type('_ImageChooserPanel',  (BaseImageChooserPanel,),  {
    'field_name':  field_name,
  })



Clone # 254
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/util/bluelet.py"
The first line is 111
Source file "../tests/beets/util/bluelet.py"
The first line is 485
class  ReadEvent(WaitableEvent):
    """Reads  from  a  file-like  object."""
    def  __init__(self,  fd,  bufsize):
      self.fd  =  fd
      self.bufsize  =  bufsize
 
    def  waitables(self):
      return  (self.fd,),  (),  ()
 
    def  fire(self):
      return  self.fd.read(self.bufsize)
 
class  ReceiveEvent(WaitableEvent):
    """An  event  for  Connection  objects  (connected  sockets)  for
    asynchronously  reading  data.
   
"""
    def  __init__(self,  conn,  bufsize):
      self.conn  =  conn
      self.bufsize  =  bufsize
 
    def  waitables(self):
      return  (self.conn.sock,),  (),  ()
 
    def  fire(self):
      return  self.conn.sock.recv(self.bufsize)
 



Clone # 255
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 40
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(images,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 256
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 58
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(images,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 257
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 40
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
p  =  request.GET.get("p",  1)   p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
paginator  =  Paginator(queries,  10)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 258
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 58
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
p  =  request.GET.get("p",  1)   p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
paginator  =  Paginator(queries,  10)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 259
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 40
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(documents,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 260
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 58
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(documents,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 261
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
p  =  request.GET.get('p',  1)   p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  20)
paginator  =  Paginator(queries,  10)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 262
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
p  =  request.GET.get('p',  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  20)
  paginator  =  Paginator(documents,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 263
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
  p  =  request.GET.get('p',  1)
p  =  request.GET.get('p',  1)
paginator  =  Paginator(queries,  10)   paginator  =  Paginator(documents,  20)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 264
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 61
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(documents,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 265
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 61
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(images,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 266
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 61
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
p  =  request.GET.get("p",  1)   p  =  request.GET.get('p',  1)
  paginator  =  Paginator(documents,  10)
paginator  =  Paginator(queries,  10)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 267
Distance between two fragments = 2
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 80
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 46
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(documents,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 268
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 80
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 43
p  =  request.GET.get("p",  1) p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(images,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 269
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 80
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 27
p  =  request.GET.get("p",  1)   p  =  request.GET.get('p',  1)
  paginator  =  Paginator(images,  10)
paginator  =  Paginator(queries,  10)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 270
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 451
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 380
siblings  =  self.node.get_sorted_pos_queryset(
  self.target.get_siblings(),  self.node)
siblings  =  self.node.get_sorted_pos_queryset(
  self.node.get_siblings(),  newobj)
try:
  newpos  =  siblings.all()[0]._get_lastpos_in_path()
except  IndexError:
  newpos  =  None
try:
  newpos  =  siblings.all()[0]._get_lastpos_in_path()
except  IndexError:
  newpos  =  None
  if  newpos  is  None:
    self.pos  =  'last-sibling'
if  newpos  is  None:
  self.pos  =  'last-sibling'



Clone # 271
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 986
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 58
if  depth  <=  1:
  return
  if  self.parent_id  is  None:
    return  1
try:
  if  update:
    del  self._cached_parent_obj
  else:
    return  self._cached_parent_obj
except  AttributeError:
  pass
  try:
    if  update:
      del  self._cached_depth
    else:
      return  self._cached_depth
  except  AttributeError:
    pass



Clone # 272
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 522
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 596
del  fields['rgt'] del  fields['depth']
del  fields['depth'] del  fields['path']
del  fields['tree_id'] del  fields['numchild']
  if  'id'  in  fields:
    #  this  happens  immediately  after  a  load_bulk
    del  fields['id']
  if  'id'  in  fields:
    #  this  happens  immediately  after  a  load_bulk
    del  fields['id']
newobj  =  {'data':  fields} newobj  =  {'data':  fields}
  if  keep_ids:
    newobj['id']  =  serobj['pk']
  if  keep_ids:
    newobj['id']  =  pyobj['pk']



Clone # 273
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 395
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 382
  _required_formsets  =  None
  _widget_overrides  =  None
  def  required_formsets(cls):
    if  cls._required_formsets  is  None:
      formsets  =  []
      for  handler_class  in  cls.children:
        formsets.extend
(handler_class.required_formsets())
      cls._required_formsets  =  formsets

    return  cls._required_formsets
  def  widget_overrides(cls):
    if  cls._widget_overrides  is  None:
      #  b
uild  a  collated  version  of  all  its  children's  widget  lists
      widgets  =  {}
      for  handler_class  in  cls.children
:
        widgets.update(handler_class.widget_overrides())
      cls._widget_overrides  =  widgets

    ret
urn  cls._widget_overrides



Clone # 274
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 275
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 276
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 277
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 306
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 313
  def  object_classnames(self):
    """
    Additional  classnames  to  add  to  the  <li  class="object">  when  rendering  this
 
  within  an  ObjectList
    """
    return  ""
  def  field_classnames(self):
    """
    Additional  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <ul  class="fields">
    """
    return  ""
  def  field_classnames(self):
    """
    Additional  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <ul  class="
fields">
    """
    return  ""
  def  field_type(self):
    """
    The  kind  of  field  it  is  e.g  boolean_field.  Useful  for  better  semantic  markup  of  field  display  based  on  type
    """
    return  ""
  def  field_type(self):
    """
    The  kind  of  field  it  is  e.boolean_field.  Useful  for  better  semantic  markup  of  field  display  based  on  type
    """
    return  ""
  def  render_as_object(self):
    """
    Render  this  object  as  it  should  appear  within  an  ObjectList.  Should  not
    include  the  <h2>  headin
or  help  text  -  ObjectList  will  supply  those
    """
    #  by  default,  assume  that  the  subclass  provides  a  catch-all  render()  method
    return  self
.render()
  def  render_as_object(self):
    """
    Render  this  object
  as  it  should  appear  within  an  ObjectList.  Should  not
    include  the
  <h2heading  or  help  text  -  ObjectList  will  supply  those
    """
    #  by  default,  assume  that  the  subclass  provides  a  catch-all  render()  method
    return  self.render()
  def  render_as_field(self):
    """
    Render  this 
object  as  it  should  appear  within  a  <ul  class="fields"list  item
    """
    #  by  default,  assume  that  the  subclass  provides  a  catch-all  render()  method
    return  self.render()



Clone # 278
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 99
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
def  mpalphabet_model(request):
    return  _prepare_db_test(request)
 
 
def  model(request):
    return  _prepare_db_test(request)
 
 
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 
def  sorted_model(request):
    return  _prepare_db_test(request)
 
 



Clone # 279
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 25
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 60
  def  test_administrator_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.administrator))
  def  test_administrator_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.administrator))
  def  test_editor_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.editor))
  def  test_editor_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.editor))
  def  test_owner_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.owner))
  def  test_owner_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.owner))
  def  test_user_cant_edit(self):
    self.assertFalse(self.document.is_editable_by_user(self.user))

  def  test_user_cant_edit(self):
    self.assertFalse(self.image.is_editable_by_user(self.user))



Clone # 280
Distance between two fragments = 4
Clone size = 8
Source file "../tests/fig/fig/cli/errors.py"
The first line is 31
Source file "../tests/fig/fig/cli/errors.py"
The first line is 13
class  DockerNotFoundGeneric(UserError):
    def  __init__(self):
      super(DockerNotFoundGeneric,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
      http://docs.docker.io/en/latest/installation/
      """)
 
 
class  DockerNotFoundMac(UserError):
    def  __init__(self):
      super(DockerNotFoundMac,  self).__init__("""
      Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  docker-osx:
 
      https://github.com/noplay/docker-osx
      """)
 
 
class  ConnectionErrorDockerOSX(UserError):
    def  __init__(self):
      super(ConnectionErrorDockerOSX,  self).__init__("""
      Co
uldn't  connect  to  Docker  daemon  -  you  might  need  to  run  `docker-osx  shell`.
      """)
 
 
class  DockerNotFoundUbuntu(UserError):
    def  __init__(self):
      super(DockerNotFoundUbuntu,  self).__init__("""
   
  Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  Docker:
 
      http://docs.docker.io/en/latest/installation/ubuntulinu
x/
      """)
 
 



Clone # 281
Distance between two fragments = 7
Clone size = 8
Source file "../tests/beets/mediafile.py"
The first line is 1197
Source file "../tests/beets/mediafile.py"
The first line is 1214
tracktotal  =  MediaField(
  MP3SlashPackStorageStyle('TRCK
',  pack_pos=1),
  MP4TupleStorageStyle('trkn',  index=1),
  StorageStyle('TRACKTOTAL'),
  StorageStyle('TRACKC'),
  StorageStyle('TOTALTRACKS'),
  A
SFStorageStyle('TotalTracks'),
  out_type=int
)
disctotal  =  MediaField(
  MP3SlashP
ackStorageStyle('TPOS',  pack_pos=1),
  MP4TupleStorageStyle('disk',  index=1),
  StorageStyle('DISCTOTAL'),
  StorageStyle('DISCC'),
  StorageStyle('TOTALDISCS'),
 
ASFStorageStyle('TotalDiscs'),
  out_type=int
)



Clone # 282
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 503
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
data  =  [
  ('2',  '4'),
  ('1',  '4'),
  ('4',  '4'),
  ('21',  '24'),
  ('24',  '24'),
  ('22',  '24'),
  ('231',  '231'),
]
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]



Clone # 283
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 455
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
data  =  [
  ('2',  '1'),
  ('1',  '1'),
  ('4',  '1'),
  ('21',  '21'),
  ('24',  '21'),
  ('22',  '21'),
  ('231',  '231'),
]
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]



Clone # 284
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 378
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
data  =  [
  ('2',  '2'),
  ('1',  '1'),
  ('4',  '4'),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '2'),
]
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]



Clone # 285
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 503
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
data  =  [
  ('2',  '4'),
  ('1',  '4'),
  ('4',  '4'),
  ('21',  '24'),
  ('24',  '24'),
  ('22',  '24'),
  ('231',  '231'),
]
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]



Clone # 286
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 455
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
data  =  [
  ('2',  '1'),
  ('1',  '1'),
  ('4',  '1'),
  ('21',  '21'),
  ('24',  '21'),
  ('22',  '21'),
  ('231',  '231'),
]
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]



Clone # 287
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 378
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
data  =  [
  ('2',  '2'),
  ('1',  '1'),
  ('4',  '4'),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '2'),
]
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]



Clone # 288
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]



Clone # 289
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 503
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 486
data  =  [
  ('2',  '4'),
  ('1',  '4'),
  ('4',  '4'),
  ('21',  '24'),
  ('24',  '24'),
  ('22',  '24'),
  ('231',  '231'),
]
data  =  [
  ('2',  '3'),
  ('1',  '2'),
  ('4',  None),
  ('21',  '22'),
  ('24',  None),
  ('22',  '23'),
  ('231',  None),
]



Clone # 290
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 503
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 469
data  =  [
  ('2',  '4'),
  ('1',  '4'),
  ('4',  '4'),
  ('21',  '24'),
  ('24',  '24'),
  ('22',  '24'),
  ('231',  '231'),
]
data  =  [
  ('2',  '1'),
  ('1',  None),
  ('4',  '3'),
  ('21',  None),
  ('24',  '23'),
  ('22',  '21'),
  ('231',  None),
]



Clone # 291
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 455
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 486
data  =  [
  ('2',  '1'),
  ('1',  '1'),
  ('4',  '1'),
  ('21',  '21'),
  ('24',  '21'),
  ('22',  '21'),
  ('231',  '231'),
]
data  =  [
  ('2',  '3'),
  ('1',  '2'),
  ('4',  None),
  ('21',  '22'),
  ('24',  None),
  ('22',  '23'),
  ('231',  None),
]



Clone # 292
Distance between two fragments = 5
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 455
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 469
data  =  [
  ('2',  '1'),
  ('1',  '1'),
  ('4',  '1'),
  ('21',  '21'),
  ('24',  '21'),
  ('22',  '21'),
  ('231',  '231'),
]
data  =  [
  ('2',  '1'),
  ('1',  None),
  ('4',  '3'),
  ('21',  None),
  ('24',  '23'),
  ('22',  '21'),
  ('231',  None),
]



Clone # 293
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 378
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 486
data  =  [
  ('2',  '2'),
  ('1',  '1'),
  ('4',  '4'),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '2'),
]
data  =  [
  ('2',  '3'),
  ('1',  '2'),
  ('4',  None),
  ('21',  '22'),
  ('24',  None),
  ('22',  '23'),
  ('231',  None),
]



Clone # 294
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 378
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 469
data  =  [
  ('2',  '2'),
  ('1',  '1'),
  ('4',  '4'),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '2'),
]
data  =  [
  ('2',  '1'),
  ('1',  None),
  ('4',  '3'),
  ('21',  None),
  ('24',  '23'),
  ('22',  '21'),
  ('231',  None),
]



Clone # 295
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 486
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]
data  =  [
  ('2',  '3'),
  ('1',  '2'),
  ('4',  None),
  ('21',  '22'),
  ('24',  None),
  ('22',  '23'),
  ('231',  None),
]



Clone # 296
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 354
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 469
data  =  [
  ('2',  True),
  ('1',  True),
  ('4',  True),
  ('21',  False),
  ('24',  False),
  ('22',  False),
  ('231',  False),
]
data  =  [
  ('2',  '1'),
  ('1',  None),
  ('4',  '3'),
  ('21',  None),
  ('24',  '23'),
  ('22',  '21'),
  ('231',  None),
]



Clone # 297
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 486
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]
data  =  [
  ('2',  '3'),
  ('1',  '2'),
  ('4',  None),
  ('21',  '22'),
  ('24',  None),
  ('22',  '23'),
  ('231',  None),
]



Clone # 298
Distance between two fragments = 6
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 392
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 469
data  =  [
  ('2',  None),
  ('1',  None),
  ('4',  None),
  ('21',  '2'),
  ('24',  '2'),
  ('22',  '2'),
  ('231',  '23'),
]
data  =  [
  ('2',  '1'),
  ('1',  None),
  ('4',  '3'),
  ('21',  None),
  ('24',  '23'),
  ('22',  '21'),
  ('231',  None),
]



Clone # 299
Distance between two fragments = 1
Clone size = 8
Source file "../tests/fig/tests/service_test.py"
The first line is 204
Source file "../tests/fig/tests/service_test.py"
The first line is 191
service  =  Service(
  name='test',
  client=self.client,
  build='this/does/not/exist/and/will/throw/error',
  project='figtest',
)
service  =  Service(
  name='test',
  client=self.client,
  build='tests/fixtures/simple-dockerfile',
  project='figtest',
)
container  =  service.start_container() container  =  service.start_container()
container.wait() container.wait()
  self.assertIn('success',  container.logs())
self.assertIn('success',  container.logs())



Clone # 300
Distance between two fragments = 7
Clone size = 8
Source file "../tests/beets/mediafile.py"
The first line is 974
Source file "../tests/beets/mediafile.py"
The first line is 834
  def  __get__(self,  mediafile,  _):
    images  =  []
    for  style  in  self.styles(mediafile):
      images.extend(style.get_list(mediafile.mgfile))
    return  images
  def  __get__(self,  mediafile,  _):
    values  =  []
    for  style  in  self.styles(mediafile):
      values.extend(style.get_list(mediafile.mgfile))
    return  [_safe_cast(self.out_type,  value)  for  value  in  values]
  def  __set__(self,  mediafile,  images):
    for  style  in  self.styles(mediafile):
      style.set_list(mediafile.mgfile,  images)

  def  __set__(self,  mediafile,  values):
    for  style  in  self.styles(mediafile):
      style.set_list(mediafile.mgfile,  values)



Clone # 301
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 105
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 118
LEAF_PAGE_MODEL_CLASSES  =  [] NAVIGABLE_PAGE_MODEL_CLASSES  =  []
_LEAF_PAGE_CONTENT_TYPE_IDS  =  []
 
 
_NAVIGABLE_PAGE_CONTENT_TYPE_IDS  =  []
 
 
def  get_leaf_page_content_type_ids():
    global  _LEAF_PAGE_CONTENT_TYPE_IDS
    if  len(_LEAF_PAGE_CONTENT_TYPE_IDS)  !=  len(LEAF_PAGE_MODEL_CLASSES):
      _LEAF_PAGE_CONTENT_TYPE_IDS  =  [
        ContentType.objects.get_for_model(cls).id  for  cls  in  LEAF_PAGE_MODEL_CLASSES
      ]
    return  _LEAF_PAGE_CONTENT_TYPE_IDS
 
 
def  get_navigable_page_content_type_ids():
    global  _NAVIGABLE_PAGE_CONTENT_TYPE_IDS
    if  len(_NAVIGABLE_PAGE_CONTENT_TYPE_IDS)  !=  len(NAVIGABLE_PAGE_MODEL_CLASSES):
      _NAVIGABLE_PAGE_CONTENT_TYPE_IDS  =  [
        ContentType.objects.get_for_model(cls).id  for  cls  in  NAVIGABLE_PAGE_MODEL_CLASSES
      ]
    return  _NAVIGABLE_PAGE_CONTENT_TYPE_IDS
 
 



Clone # 302
Distance between two fragments = 6
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 406
Source file "../tests/beets/ui/migrate.py"
The first line is 401
db_fn  =  migrate_db(replace=True) config_fn  =  migrate_config(replace=True)
if  db_fn:
  log.info(u'Migrated  library  database  to:  {0}'.format(
    util.displayable_path(db_fn)
  ))
if  config_fn:
  log.info(u'Migrated  configuration  to:  {0}'.format(
    util.displayable_path(config_fn)
  ))
state_fn  =  migrate_state(replace=True) db_fn  =  migrate_db(replace=True)
if  state_fn:
  log.info(u'Migrated  state  file  to:  {0}'.format(
    util.displayable_path(state_fn)
  ))
if  db_fn:
  log.info(u'Migrated  library  database  to:  {0}'.format(
    util.displayable_path(db_fn)
  ))



Clone # 303
Distance between two fragments = 1
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2403
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2381
node  =  model.objects.get(desc='231') node  =  model.objects.get(desc='231')
  target  =  model.objects.get(desc='2')
  target  =  model.objects.get(desc='2')
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={'node_id':  node.pk,
  'sibling_id':  target.pk,
  'as_child':  1})
request  =  self._mocked_request(data={'node_id':  node.pk,
  'sibling_id':  target.pk,
  'as_child':  0})
response  =  admin_obj.move_node(request) response  =  admin_obj.move_node(request)
assert  response.status_code  ==  200 assert  response.status_code  ==  200



Clone # 304
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2018
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1985
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
form  =  form_class(
  instance=saved_instance,
  data={
    '_position':  'first-child',
    '_ref_node_id':  '',
    'desc':  saved_instance.desc
  }
)
form  =  form_class(
  instance=instance_parent,
  data={
    '_position':  _position,
    '_ref_node_id':  _ref_node_id,
    'desc':  instance_parent.desc
  }
)
assert  form.is_valid() assert  form.is_valid()



Clone # 305
Distance between two fragments = 8
Clone size = 8
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2000
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1985
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
form  =  form_class(
  instance=instance_parent,
  data={
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='2').pk,
    'desc':  instance_parent.desc
  }
)
form  =  form_class(
  instance=instance_parent,
  data={
    '_position':  _position,
    '_ref_node_id':  _ref_node_id,
    'desc':  instance_parent.desc
  }
)
assert  form.is_valid() assert  form.is_valid()



Clone # 306
Distance between two fragments = 8
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 88
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 81
  def  test_resize_to_max(self):
    rendition  =  self.image.get_rendition('max-100x100')

    #  Check  size
    self.assertEqual(rendition.width,  100)
    self.assertEqual(rendition.height,  75)
  def  test_minification(self):
    rendition  =  self.image.get_rendition('width-400')

    #  Check  size
    self.assertEqual(rendition.width,  400)
    self.assertEqual(rendition.height,  300)
  def  test_resize_to_min(self):
    rendition  =  self.image.get_rendition('min-120x120')

    #  Check  size
    self.assertEqual(rendition.width,  160)
    self.assertEqual(rendition.height,  120)
  def  test_resize_to_max(self):
    rendition  =  self.image.get_rendition('max-100x100')

    #  Check  size
    self.assertEqual(rendition.width,  100)
    self.assertEqual(rendition.height,  75)



Clone # 307
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 28
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 28
  def  backwards(self,  orm):
    image_content_type  =  orm['contenttypes.ContentType'].objects.get(
      model='image',  app_label='wagtailimages')
    image
_permissions  =  orm['auth.permission'].objects.filter(content_type=image_content_type)

    editors_group  =  orm['auth.group'].objects.get(name='Editors')
    editors_group.permissions.remove(*image_permissions)

    moderators_group  =  orm['auth.group'].objects.get(name='Moderators')
    moderators_group.permissions.remove(*image_permissions)
  def  backwards(self,  orm):
    document_content_type  =  orm['contenttypes.ContentType'].objects.get(
      model='document',  app_label='wagtaildocs')
    document
_permissions  =  orm['auth.permission'].objects.filter(content_type=document_content_type)

    editors_group  =  orm['auth.group'].objects.get(name='Editors')
    editors_group.permissions.remove(*document_permissions)

    moderators_group  =  orm['auth.group'].objects.get(name='Moderators')
    moderators_group.permissions.remove(*document_permissions)



Clone # 308
Distance between two fragments = 4
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 1
import  json
 
import  json
 
from  django.shortcuts  import  get_object_or_404,  render from  django.shortcuts  import  get_object_or_404,  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtaildocs.models  import  Document from  wagtail.wagtailimages.models  import  get_image_model
from  wagtail.wagtaildocs.forms  import  DocumentForm
 
 
from  wagtail.wagtailimages.forms  import  get_image_form,  ImageInsertionForm



Clone # 309
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  os import  socket
import  ConfigParser import  select
import  codecs import  sys
import  yaml import  types
import  logging import  errno
import  time import  traceback
import  itertools import  time
import  re
 
import  collections
 
 



Clone # 310
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  os import  sys
import  ConfigParser import  tty
import  codecs import  fcntl
import  yaml import  os
import  logging import  termios
import  time import  threading
import  itertools import  errno
 
import  re
 
import  logging



Clone # 311
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  os import  ConfigParser
import  ConfigParser import  codecs
import  codecs import  yaml
import  yaml import  logging
import  logging import  time
import  time import  itertools
import  itertools import  re
 
import  re
 
import  beets



Clone # 312
Distance between two fragments = 7
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 17
import  os import  os
import  ConfigParser import  re
import  codecs import  sys
import  yaml import  logging
import  logging import  shlex
import  time import  unicodedata
import  itertools import  traceback
import  re
 
import  time



Clone # 313
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  socket import  sys
import  select import  tty
import  sys import  fcntl
import  types import  os
import  errno import  termios
import  traceback import  threading
import  time import  errno
 
import  collections
 
 
import  logging



Clone # 314
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  socket import  ConfigParser
import  select import  codecs
import  sys import  yaml
import  types import  logging
import  errno import  time
import  traceback import  itertools
import  time import  re
 
import  collections
 
 
import  beets



Clone # 315
Distance between two fragments = 7
Clone size = 8
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/library.py"
The first line is 17
import  socket import  os
import  select import  re
import  sys import  sys
import  types import  logging
import  errno import  shlex
import  traceback import  unicodedata
import  time import  traceback
import  collections
 
 
import  time



Clone # 316
Distance between two fragments = 8
Clone size = 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  sys import  ConfigParser
import  tty import  codecs
import  fcntl import  yaml
import  os import  logging
import  termios import  time
import  threading import  itertools
import  errno
 
import  re
 
import  logging import  beets



Clone # 317
Distance between two fragments = 8
Clone size = 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 17
import  sys import  os
import  tty import  re
import  fcntl import  sys
import  os import  logging
import  termios import  shlex
import  threading import  unicodedata
import  errno
 
import  traceback
import  logging import  time



Clone # 318
Distance between two fragments = 8
Clone size = 8
Source file "../tests/beets/ui/migrate.py"
The first line is 21
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  yaml import  logging
import  logging import  sqlite3
import  time import  errno
import  itertools import  re
import  re
 
import  struct
import  beets import  traceback
 
from  beets  import  util from  beets  import  library
from  beets  import  ui from  beets  import  plugins



Clone # 319
Distance between two fragments = 7
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 281
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 286
self.section_a  =  SimplePage() self.section_b  =  SimplePage()
self.section_a.title  =  "Section  A" self.section_b.title  =  "Section  B"
self.section_a.slug  =  "section-a" self.section_b.slug  =  "section-b"
  self.root_page.add_child(self.section_a)
  self.root_page.add_child(self.section_b)
self.section_b  =  SimplePage() self.test_page  =  SimplePage()
self.section_b.title  =  "Section  B" self.test_page.title  =  "Hello  world!"
self.section_b.slug  =  "section-b" self.test_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_b)
  self.section_a.add_child(self.test_page)



Clone # 320
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 69
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 139
  def  get(self,  params={},  user_id=None):
    return  self.client.get(reverse('wagtailusers_edit',  args=(user_id  or  self.test_user.id,  )),  params)
  def  get(self,  params={},  redirect_id=None):
    return  self.client.get(reverse('wagtailredirects_edit_redirect',  args=(redirect_id  or  self.redirect.id,  )),  params)
  def  post(self,  post_data={},  user_id=None):
    return  self.client.post(reverse('wagtailusers_edit',  args=(user_id  or  self.test_user.id,  )),  post_data)
  def  post(self,  post_data={},  redirect_id=None):
    return  self.client.post(reverse('wagtailredirects_edit_redirect',  args=(redirect_id  or  self.redirect.id,  )),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(user_id=100000).status_code,  404)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(redirect_id=100000).status_code,  404)



Clone # 321
Distance between two fragments = 3
Clone size = 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 69
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 185
  def  get(self,  params={},  user_id=None):
    return  self.client.get(reverse('wagtailusers_edit',  args=(user_id  or  self.test_user.id,  )),  params)
  def  get(self,  params={},  redirect_id=None):
    return  self.client.get(reverse('wagtailredirects_delete_redirect',  args=(redirect_id  or  self.redirect.id,  )),  params)
  def  post(self,  post_data={},  user_id=None):
    return  self.client.post(reverse('wagtailusers_edit',  args=(user_id  or  self.test_user.id,  )),  post_data)
  def  post(self,  post_data={},  redirect_id=None):
    return  self.client.post(reverse('wagtailredirects_delete_redirect',  args=(redirect_id  or  self.redirect.id,  )),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(user_id=100000).status_code,  404)
  def  test_nonexistant_redirect(self):
    self.assertEqual(self.get(redirect_id=100000).status_code,  404)



Clone # 322
Distance between two fragments = 2
Clone size = 7
Source file "../tests/beets/autotag/mb.py"
The first line is 317
Source file "../tests/beets/autotag/mb.py"
The first line is 341
  if  not  any(criteria.itervalues()):
    return
  if  not  any(criteria.itervalues()):
    return
try:
  res  =  musicbrainzngs.search_releases(limit=limit,  **criteria)
except  musicbrainzngs.MusicBrainzError  as  exc:
  raise  MusicBrainzAPIError(exc,  'release  search',  criteria,
    traceback.format_exc())
try:
  res  =  musicbrainzngs.search_recordings(limit=limit,  **criteria)
except  musicbrainzngs.MusicBrainzError  as  exc:
  raise  MusicBrainzAPIError(exc,  'recording  search',  criteria,
    traceback.format_exc())



Clone # 323
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 283
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 229
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  params)



Clone # 324
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 283
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 197
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    login(self.client)

    #  Create  an  image  to  edit
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  params)



Clone # 325
Distance between two fragments = 4
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 912
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 900
  def  test_delete_same_node_twice(self,  model):
    model.objects.filter(desc__in=('2',  '2')).delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_delete_filter_children(self,  model):
    model.objects.filter(desc__in=('2',  '23',  '231')).delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 326
Distance between two fragments = 4
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 912
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 885
  def  test_delete_same_node_twice(self,  model):
    model.objects.filter(desc__in=('2',  '2')).delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_delete_root(self,  model):
    model.objects.get(desc='2').delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 327
Distance between two fragments = 6
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 900
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 885
  def  test_delete_filter_children(self,  model):
    model.objects.filter(desc__in=('2',  '23',  '231')).delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected
  def  test_delete_root(self,  model):
    model.objects.get(desc='2').delete()
    expected  =  [('1',  1,  0),
      ('3',  1,  0),
      ('4',  1,  1),
      ('41',  2,  0)]
    assert  self.got(model)  ==  expected



Clone # 328
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/tests/service_test.py"
The first line is 13
Source file "../tests/fig/tests/service_test.py"
The first line is 10
self.assertRaises(ConfigError,  lambda:  Service(name='/'))   self.assertRaises(ConfigError,  lambda:  Service(name=''))
self.assertRaises(ConfigError,  lambda:  Service(name='!')) self.assertRaises(ConfigError,  lambda:  Service(name='  '))
self.assertRaises(ConfigError,  lambda:  Service(name='\xe2')) self.assertRaises(ConfigError,  lambda:  Service(name='/'))
self.assertRaises(ConfigError,  lambda:  Service(name='_')) self.assertRaises(ConfigError,  lambda:  Service(name='!'))
self.assertRaises(ConfigError,  lambda:  Service(name='____')) self.assertRaises(ConfigError,  lambda:  Service(name='\xe2'))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar')) self.assertRaises(ConfigError,  lambda:  Service(name='_'))
  self.assertRaises(ConfigError,  lambda:  Service(name='__foo_bar__'))
self.assertRaises(ConfigError,  lambda:  Service(name='____'))



Clone # 329
Distance between two fragments = 1
Clone size = 7
Source file "../tests/beets/importer.py"
The first line is 669
Source file "../tests/beets/importer.py"
The first line is 978
task  =  yield  task task  =  yield  task
  if  task.should_skip():
    continue
  if  task.should_skip():
    continue
choice  =  session.choose_match(task) choice  =  session.choose_item(task)
task.set_choice(choice) task.set_choice(choice)
session.log_choice(task) session.log_choice(task)
  plugins.send('import_task_choice',  session=session,  task=task)
  plugins.send('import_task_choice',  session=session,  task=task)



Clone # 330
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 201
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 164
instance.delete()   form.save()
messages.success(
  request,
  _("{snippet_type}  '{instance}'  deleted.").format(
    snippet_type=capfirst(snippet_type_name),
    instance=instance
  )
)
messages.success(
  request,
  _("{snippet_type}  '{instance}'  updated.").format(
    snippet_type=capfirst(snippet_type_name),
    instance=instance
  )
)
  return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)
return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)



Clone # 331
Distance between two fragments = 4
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 69
class  TestEditorsPicksAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/add/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 
class  TestDocumentAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_add_document'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 332
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 299
class  TestDocumentChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestImageChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)



Clone # 333
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 69
class  TestDocumentChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestDocumentAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_add_document'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 334
Distance between two fragments = 4
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 70
class  TestDocumentChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestEditorsPicksAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/add/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 335
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 299
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 69
class  TestImageChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestDocumentAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtaildocs_add_document'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 336
Distance between two fragments = 4
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 299
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 70
class  TestImageChooserUploadView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
class  TestEditorsPicksAddView(TestCase):
    def  setUp(self):
      login(self.client)
 
    def  get(self,  params={}):
      return  self.client.get('/admin/search/editorspicks/add/',  params)
 
    def  test_status_code(self):
      self.assertEqual(self.get().status_code,  200)
 
 



Clone # 337
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/importer.py"
The first line is 27
Source file "../tests/beets/ui/__init__.py"
The first line is 33
from  beets  import  library from  beets  import  library
from  beets  import  dbcore from  beets  import  plugins
from  beets  import  plugins from  beets  import  util
from  beets  import  util from  beets.util.functemplate  import  Template
from  beets  import  config from  beets  import  config
from  beets.util  import  pipeline from  beets.util  import  confit
from  beets.util  import  syspath,  normpath,  displayable_path from  beets.autotag  import  mb
 
 



Clone # 338
Distance between two fragments = 6
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib.auth.decorators  import  permission_required from  django.contrib  import  messages
from  django.contrib  import  messages
 
from  django.contrib.auth.decorators  import  permission_required
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext    as  _
 
from  wagtail.wagtailsearch  import  models,  forms from  wagtail.wagtailadmin.edit_handlers  import  ObjectList
from  wagtail.wagtailadmin.forms  import  SearchForm
 
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 



Clone # 339
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/utils.py"
The first line is 1
Source file "../tests/fig/fig/service.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
from  __future__  import  division from  .packages.docker.client  import  APIError
import  datetime import  logging
import  os import  re
import  socket import  os
import  subprocess import  sys



Clone # 340
Distance between two fragments = 6
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 17
from  __future__  import  print_function
 
from  __future__  import  unicode_literals
import  logging import  platform
import  os import  os
import  time import  pkgutil
import  itertools import  sys
import  codecs import  yaml
import  platform
 
import  types



Clone # 341
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/util/confit.py"
The first line is 17
from  __future__  import  print_function from  __future__  import  unicode_literals
import  sys import  platform
import  tty import  os
import  fcntl import  pkgutil
import  os import  sys
import  termios import  yaml
import  threading import  types



Clone # 342
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 25
from  __future__  import  print_function
 
from  difflib  import  SequenceMatcher
import  logging import  logging
import  os import  sqlite3
import  time import  errno
import  itertools import  re
import  codecs import  struct
import  platform
 
import  traceback
 



Clone # 343
Distance between two fragments = 0
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 116
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 84
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  page_class  =  content_type.model_class()
page_class  =  content_type.model_class()
  if  not  issubclass(page_class,  Page):
    raise  Http404
  if  not  issubclass(page_class,  Page):
    raise  Http404



Clone # 344
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 29
paginator  =  Paginator(queries,  20) paginator  =  Paginator(queries,  10)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 345
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
paginator  =  Paginator(queries,  20) paginator  =  Paginator(redirects,  20)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 346
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 41
paginator  =  Paginator(queries,  20)   paginator  =  Paginator(documents,  10)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 347
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 59
paginator  =  Paginator(queries,  20)   paginator  =  Paginator(images,  10)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 348
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 47
paginator  =  Paginator(queries,  20)   paginator  =  Paginator(documents,  20)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 349
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
paginator  =  Paginator(queries,  20)   paginator  =  Paginator(users,  20)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 350
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 44
paginator  =  Paginator(queries,  20)   paginator  =  Paginator(images,  20)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 351
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
paginator  =  Paginator(queries,  10) paginator  =  Paginator(redirects,  20)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 352
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
paginator  =  Paginator(queries,  10)   paginator  =  Paginator(users,  20)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 353
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 41
paginator  =  Paginator(redirects,  20)   paginator  =  Paginator(documents,  10)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 354
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 59
paginator  =  Paginator(redirects,  20)   paginator  =  Paginator(images,  10)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 355
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 47
paginator  =  Paginator(redirects,  20)   paginator  =  Paginator(documents,  20)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 356
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
paginator  =  Paginator(redirects,  20)   paginator  =  Paginator(users,  20)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 357
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 44
paginator  =  Paginator(redirects,  20)   paginator  =  Paginator(images,  20)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 358
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 41
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(users,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 359
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(users,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 360
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 47
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
  paginator  =  Paginator(documents,  20)
  paginator  =  Paginator(users,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 361
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 44
  paginator  =  Paginator(users,  20)
  paginator  =  Paginator(images,  20)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 362
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 62
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(documents,  10)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 363
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 81
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(images,  10)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 364
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
paginator  =  Paginator(pages,  20) paginator  =  Paginator(search_results,  results_per_page)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)



Clone # 365
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 62
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
  paginator  =  Paginator(documents,  10)
paginator  =  Paginator(search_results,  results_per_page)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)



Clone # 366
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 81
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
  paginator  =  Paginator(images,  10)
paginator  =  Paginator(search_results,  results_per_page)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)



Clone # 367
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(users,  20)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 368
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 41
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(documents,  10)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 369
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 47
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(documents,  20)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 370
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 59
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(images,  10)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 371
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 44
paginator  =  Paginator(pages,  20)   paginator  =  Paginator(images,  20)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 372
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
paginator  =  Paginator(pages,  20) paginator  =  Paginator(queries,  20)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 373
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 29
paginator  =  Paginator(pages,  20) paginator  =  Paginator(queries,  10)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 374
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 552
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
paginator  =  Paginator(pages,  20) paginator  =  Paginator(redirects,  20)
try:
  pages  =  paginator.page(p)
except  PageNotAnInteger:
  pages  =  paginator.page(1)
except  EmptyPage:
  pages  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 375
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 62
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
  paginator  =  Paginator(documents,  10)
  paginator  =  Paginator(users,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 376
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 62
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
  paginator  =  Paginator(documents,  10)
paginator  =  Paginator(queries,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 377
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 62
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
  paginator  =  Paginator(documents,  10)
paginator  =  Paginator(redirects,  20)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 378
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 81
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
  paginator  =  Paginator(images,  10)
  paginator  =  Paginator(users,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 379
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 81
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
  paginator  =  Paginator(images,  10)
paginator  =  Paginator(queries,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 380
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 81
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
  paginator  =  Paginator(images,  10)
paginator  =  Paginator(redirects,  20)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 381
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 44
paginator  =  Paginator(search_results,  results_per_page)   paginator  =  Paginator(users,  20)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    users  =  paginator.page(p)
  except  PageNotAnInteger:
    users  =  paginator.page(1)
  except  EmptyPage:
    users  =  paginator.page(paginator.num_pages)



Clone # 382
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 41
paginator  =  Paginator(search_results,  results_per_page)   paginator  =  Paginator(documents,  10)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 383
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 47
paginator  =  Paginator(search_results,  results_per_page)   paginator  =  Paginator(documents,  20)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    documents  =  paginator.page(p)
  except  PageNotAnInteger:
    documents  =  paginator.page(1)
  except  EmptyPage:
    documents  =  paginator.page(paginator.num_pages)



Clone # 384
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 59
paginator  =  Paginator(search_results,  results_per_page)   paginator  =  Paginator(images,  10)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 385
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 44
paginator  =  Paginator(search_results,  results_per_page)   paginator  =  Paginator(images,  20)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    images  =  paginator.page(p)
  except  PageNotAnInteger:
    images  =  paginator.page(1)
  except  EmptyPage:
    images  =  paginator.page(paginator.num_pages)



Clone # 386
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 24
paginator  =  Paginator(search_results,  results_per_page) paginator  =  Paginator(queries,  20)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(page)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 387
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 29
paginator  =  Paginator(search_results,  results_per_page) paginator  =  Paginator(queries,  10)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    queries  =  paginator.page(p)
  except  PageNotAnInteger:
    queries  =  paginator.page(1)
  except  EmptyPage:
    queries  =  paginator.page(paginator.num_pages)



Clone # 388
Distance between two fragments = 2
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 36
paginator  =  Paginator(search_results,  results_per_page) paginator  =  Paginator(redirects,  20)
try:
  search_results  =  paginator.page(page)
except  PageNotAnInteger:
  search_results  =  paginator.page(1)
except  EmptyPage:
  search_results  =  paginator.page(paginator.num_pages)
  try:
    redirects  =  paginator.page(page)
  except  PageNotAnInteger:
    redirects  =  paginator.page(1)
  except  EmptyPage:
    redirects  =  paginator.page(paginator.num_pages)



Clone # 389
Distance between two fragments = 3
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 354
Source file "../tests/beets/ui/commands.py"
The first line is 347
if  match.extra_items:
  print_('Unmatched  tracks:')
if  match.extra_tracks:
  print_('Missing  tracks:')
  for  item  in  match.extra_items:
    line  =  '  !  %s  (#%s)'  %  (item.title,  format_index(item))
    if  item.length:
 
    line  +=  '  (%s)'  %  ui.human_seconds_short(item.length)
    print_(ui.colorize('yellow',  line))
for  track_info  in  match.extra_tracks:
  line  =  '  !  %s  (#%s)'  %  (track_info.title,  for
mat_index(track_info))
  if  track_info.length
:
    line  +=  '  (%s)'  %  ui.human_seconds_short(track_info.length)
  print_(ui.colorize('yellow',  line))



Clone # 390
Distance between two fragments = 2
Clone size = 7
Source file "../tests/beets/plugins.py"
The first line is 276
Source file "../tests/beets/plugins.py"
The first line is 286
def  album_for_id(album_id):
    """Get  AlbumInfo  objects  for  a  given  ID  string.
    """
    out  =  []
    for  plugin  in  find_plugins():
      res  =  plugin.album_for_id(album_id)
      if  res:
        out.append(res)
    return  out
 
def  track_for_id(track_id):
    """Get  TrackInfo  objects  for  a  given  ID  string.
    """
    out  =  []
    for  plugin  in  find_plugins():
      res  =  plugin.track_for_id(track_id)
      if  res:
        out.append(res)
    return  out
 



Clone # 391
Distance between two fragments = 6
Clone size = 7
Source file "../tests/beets/mediafile.py"
The first line is 1189
Source file "../tests/beets/mediafile.py"
The first line is 1206
track  =  MediaField(
  MP3SlashPack
StorageStyle('TRCK',  pack_pos=0),
  MP4TupleStorageStyle('trkn',  index=0),
  StorageStyle('TRACK'),
  StorageStyle('TRA
CKNUMBER'),
  ASFStorageStyle('WM/TrackNumber'),
  ou
t_type=int
)
disc  =  MediaField(
  MP3SlashP
ackStorageStyle('TPOS',  pack_pos=0),
  MP4TupleStorageStyle('disk',  index=0),
  StorageStyle('DISC'),
  StorageStyle('DIS
CNUMBER'),
  ASFStorageStyle('WM/PartOfSet'),
  o
ut_type=int
)



Clone # 392
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 327
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 212
if  pos  ==  'sorted-sibling':
  siblings  =  list(target.get_sorted_pos_queryset(
    target.get_siblings(),  self))
  if  siblings:
    pos  =  'left'
    target  =  siblings[0]
  else:
    pos  =  'last-sibling'
  if  pos  ==  'sorted-sibling':
    siblings  =  list(target.get_sorted_pos_queryset(
      target.get_siblings(),  newobj))
    if  siblings:
      pos  =  'left'
      target  =  siblings[0]
    else:
      pos  =  'last-sibling'



Clone # 393
Distance between two fragments = 0
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 237
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 212
  if  pos  ==  'sorted-sibling':
    siblings  =  list(target.get_sorted_pos_queryset(
      target.get_siblings(),  newobj))
    if  siblings:
      pos  =  'left'
      target  =  siblings[0]
    else:
      pos  =  'last-sibling'
  if  pos  ==  'sorted-sibling':
    siblings  =  list(target.get_sorted_pos_queryset(
      target.get_siblings(),  newobj))
    if  siblings:
      pos  =  'left'
      target  =  siblings[0]
    else:
      pos  =  'last-sibling'



Clone # 394
Distance between two fragments = 5
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 9
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 35
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=0,
    description="First  editors  pick",
  )
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=1,
    description="Middle  editors  pick",
  )
self.assertEqual(models.Query.get("root  page").editors_picks.count(),  1) self.assertEqual(models.Query.get("root  page").editors_picks.count(),  3)
  self.assertEqual(models.Query.get("root  page").editors_picks.first().page_id1)
self.assertEqual(models.Query.get("root  page").editors_picks.first().description"First  editors  pick")



Clone # 395
Distance between two fragments = 3
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1787
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1779
  def  test_fix_tree_destructive(self,  mpshort_model):
    self.add_broken_test_data(mpshort_model)
    mpshort_model.fix_tree(destructive=True)
    got  =  self.got(mpshort_model)
    expected  =  self.expected_no_holes[mpshort_model]
    assert  got  ==  expected
    mpshort_model.find_problems()

  def  test_fix_tree_non_destructive(self,  mpshort_model):
    self.add_broken_test_data(mpshort_model)
    mpshort_model.fix_tree(destructive=False)
    got  =  self.got(mpshort_model)
    expected  =  self.expected_with_holes[mpshort_model]
    assert  got  ==  expected
    mpshort_model.find_problems()



Clone # 396
Distance between two fragments = 1
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 131
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 104
post_data  =  {
  'title':  "New  page!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}
post_data  =  {
  'title':  "New  page!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}
  response  =  self.client.post(reverse('wagtailadmin_pages_create',  args=('tests',  'simplepage',  self.root_page.id)),  post_data)
  response  =  self.client.post(reverse('wagtailadmin_pages_create',  args=('tests',  'simplepage',  self.root_page.id)),  post_data)
  self.assertEqual(response.status_code,  200)
  self.assertEqual(response.status_code,  302)



Clone # 397
Distance between two fragments = 7
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 36
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 53
default_site  =  Site.objects.get(is_default_site=True) default_site  =  Site.objects.get(is_default_site=True)
homepage  =  Page.objects.get(url_path='/home/') homepage  =  Page.objects.get(url_path='/home/')
  christmas_page  =  Page.objects.get(url_path='/home/events/christmas/')
  christmas_page  =  Page.objects.get(url_path='/home/events/christmas/')
self.assertEqual(homepage.full_url,  'http://localhost/') self.assertEqual(homepage.full_url,  'http://localhost/')
self.assertEqual(homepage.url,  '/') self.assertEqual(homepage.url,  'http://localhost/')
  self.assertEqual(homepage.relative_url(default_site),  '/')
self.assertEqual(homepage.relative_url(default_site),  '/')
self.assertEqual(christmas_page.full_url,  'http://localhost/events/christmas/')   self.assertEqual(homepage.relative_url(events_site),  'http://localhost/')



Clone # 398
Distance between two fragments = 6
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 263
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 198
user  =  User.objects.get(username='superuser') event_moderator  =  User.objects.get(username='eventmoderator')
homepage  =  Page.objects.get(url_path='/home/') homepage  =  Page.objects.get(url_path='/home/')
root  =  Page.objects.get(url_path='/') christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/')
  unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')
  unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')
homepage_perms  =  homepage.permissions_for_user(user) homepage_perms  =  homepage.permissions_for_user(event_moderator)
root_perms  =  root.permissions_for_user(user) christmas_page_perms  =  christmas_page.permissions_for_user(event_moderator)
  unpub_perms  =  unpublished_event_page.permissions_for_user(user)
  unpub_perms  =  unpublished_event_page.permissions_for_user(event_moderator)



Clone # 399
Distance between two fragments = 0
Clone size = 7
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 217
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 20
  def  setUp(self):
    #  Find  root  page
    self.root_page  =  Page.objects.get(id=2)

    #  Add  child  page
    self.child_page  =  SimplePage()
    self.child_page.title  =  "Hello  world!"
    self.child_page.slug  =  "hello-world"
    self.root_page.add_child(self.child_page)

    #  Login
    login(self.client)
  def  setUp(self):
    #  Find  root  page
    self.root_page  =  Page.objects.get(id=2)

    #  Add  child  page
    self.child_page  =  SimplePage()
    self.child_page.title  =  "Hello  world!"
    self.child_page.slug  =  "hello-world"
    self.root_page.add_child(self.child_page)

    #  Login
    login(self.client)



Clone # 400
Distance between two fragments = 3
Clone size = 7
Source file "../tests/beets/importer.py"
The first line is 1001
Source file "../tests/beets/importer.py"
The first line is 726
  while  True:
    task  =  yield  task
    if  task.should_skip():
      continue

    log.info(displayable_path(task.item.path))
    task.set_null_candidates()
    task.set_choice(action.
ASIS)

  while  True:
    task  =  yield  task
    if  task.should_skip():
      continue

    log.info(displayable_path(task.paths))

    #  Behave  as  if 
ASIS  were  selected.
    task.set_null_candidates()
    task.set_choice(action.ASIS)



Clone # 401
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/__init__.py"
The first line is 23
Source file "../tests/beets/dbcore/db.py"
The first line is 17
import  textwrap import  time
import  sys import  os
from  difflib  import  SequenceMatcher from  collections  import  defaultdict
import  logging import  threading
import  sqlite3 import  sqlite3
import  errno import  contextlib
 
import  re import  beets



Clone # 402
Distance between two fragments = 5
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 3
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 3
import  sys import  sys
import  operator
 
import  operator
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
from  django.db.models  import  Q from  django.core  import  serializers
from  django.db  import  models,  transaction,  router,  connections
 
from  django.db  import  models,  transaction,  connection
from  treebeard.exceptions  import  InvalidPositionMissingNodeOrderBy
 
 
from  django.db.models  import  FQ



Clone # 403
Distance between two fragments = 5
Clone size = 7
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 3
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 3
import  sys import  sys
import  operator
 
import  operator
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
if  sys.version_info  >=  (3,  0):
    from  functools  import  reduce
 
from  django.db.models  import  Q from  django.core  import  serializers
from  django.db  import  models,  transaction,  router,  connections
 
from  django.db  import  connection,  models,  transaction
from  treebeard.exceptions  import  InvalidPosition,  MissingNodeOrderBy
 
 
from  django.db.models  import  Q



Clone # 404
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  socket import  select
import  select import  sys
import  sys import  types
import  types import  errno
import  errno import  traceback
import  traceback import  time
import  time import  collections
 
 



Clone # 405
Distance between two fragments = 6
Clone size = 7
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  os import  select
import  ConfigParser import  sys
import  codecs import  types
import  yaml import  errno
import  logging import  traceback
import  time import  time
import  itertools import  collections
 
 



Clone # 406
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  os import  select
import  re import  sys
import  sys import  types
import  logging import  errno
import  shlex import  traceback
import  unicodedata import  time
import  traceback import  collections
 
 



Clone # 407
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  sys import  select
import  tty import  sys
import  fcntl import  types
import  os import  errno
import  termios import  traceback
import  threading import  time
import  errno
 
import  collections
 
 



Clone # 408
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  socket import  tty
import  select import  fcntl
import  sys import  os
import  types import  termios
import  errno import  threading
import  traceback import  errno
 
import  time import  logging



Clone # 409
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  os import  tty
import  ConfigParser import  fcntl
import  codecs import  os
import  yaml import  termios
import  logging import  threading
import  time import  errno
 
import  itertools import  logging



Clone # 410
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  os import  tty
import  re import  fcntl
import  sys import  os
import  logging import  termios
import  shlex import  threading
import  unicodedata import  errno
 
import  traceback import  logging



Clone # 411
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  sys import  tty
import  tty import  fcntl
import  fcntl import  os
import  os import  termios
import  termios import  threading
import  threading import  errno
 
import  errno
 
import  logging



Clone # 412
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  socket import  codecs
import  select import  yaml
import  sys import  logging
import  types import  time
import  errno import  itertools
import  traceback import  re
 
import  time import  beets



Clone # 413
Distance between two fragments = 5
Clone size = 7
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/library.py"
The first line is 18
import  socket import  re
import  select import  sys
import  sys import  logging
import  types import  shlex
import  errno import  unicodedata
import  traceback import  traceback
import  time import  time



Clone # 414
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  os import  codecs
import  ConfigParser import  yaml
import  codecs import  logging
import  yaml import  time
import  logging import  itertools
import  time import  re
 
import  itertools import  beets



Clone # 415
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 18
import  os import  re
import  ConfigParser import  sys
import  codecs import  logging
import  yaml import  shlex
import  logging import  unicodedata
import  time import  traceback
import  itertools import  time



Clone # 416
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  os import  codecs
import  re import  yaml
import  sys import  logging
import  logging import  time
import  shlex import  itertools
import  unicodedata import  re
 
import  traceback import  beets



Clone # 417
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 18
import  os import  re
import  re import  sys
import  sys import  logging
import  logging import  shlex
import  shlex import  unicodedata
import  unicodedata import  traceback
import  traceback import  time



Clone # 418
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  sys import  codecs
import  tty import  yaml
import  fcntl import  logging
import  os import  time
import  termios import  itertools
import  threading import  re
 
import  errno
 
import  beets



Clone # 419
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 18
import  sys import  re
import  tty import  sys
import  fcntl import  logging
import  os import  shlex
import  termios import  unicodedata
import  threading import  traceback
import  errno
 
import  time



Clone # 420
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  logging import  select
import  os import  sys
import  time import  types
import  itertools import  errno
import  codecs import  traceback
import  platform
 
import  time
import  beets import  collections
 
 



Clone # 421
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  logging import  socket
import  os import  select
import  time import  sys
import  itertools import  types
import  codecs import  errno
import  platform
 
import  traceback
import  beets import  time



Clone # 422
Distance between two fragments = 6
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  logging import  codecs
import  os import  yaml
import  time import  logging
import  itertools import  time
import  codecs import  itertools
import  platform
 
import  re
 
import  beets import  beets



Clone # 423
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  logging import  ConfigParser
import  os import  codecs
import  time import  yaml
import  itertools import  logging
import  codecs import  time
import  platform
 
import  itertools
import  beets import  re
 



Clone # 424
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  logging import  os
import  os import  ConfigParser
import  time import  codecs
import  itertools import  yaml
import  codecs import  logging
import  platform
 
import  time
import  beets import  itertools



Clone # 425
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 18
import  logging import  re
import  os import  sys
import  time import  logging
import  itertools import  shlex
import  codecs import  unicodedata
import  platform
 
import  traceback
import  beets import  time



Clone # 426
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 17
import  logging import  os
import  os import  re
import  time import  sys
import  itertools import  logging
import  codecs import  shlex
import  platform
 
import  unicodedata
import  beets import  traceback



Clone # 427
Distance between two fragments = 7
Clone size = 7
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  logging import  tty
import  os import  fcntl
import  time import  os
import  itertools import  termios
import  codecs import  threading
import  platform
 
import  errno
 
import  beets import  logging



Clone # 428
Distance between two fragments = 7
Clone size = 7
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 19
import  json import  sys
import  re import  logging
import  shlex import  shlex
import  struct
 
import  unicodedata
import  requests import  traceback
import  requests.exceptions import  time
from  fig.packages  import  six
 
from  unidecode  import  unidecode



Clone # 429
Distance between two fragments = 2
Clone size = 7
Source file "../tests/beets/plugins.py"
The first line is 166
Source file "../tests/beets/plugins.py"
The first line is 153
  def  template_field(cls,  name):
    """Decorator  that  registers  a  path  template  field  computation.
 
  The  value  will  be  referenced  as  ``$name``  from  path  format
    strings.  The  function  must  accept  a  single  parameter,  the  Item
    being  formatted.

    """
    def  helper(func):
      if  cls.template_fields  is  None:
        cls.template_fields  =  {}
      cls.template_fields[name]  =  func
      return  func
    return  helper
  def  template_func(cls,  name):
    """Decorator  that  registers  a  path  template  function.  The
    function  will  be  in
voked  as  ``%name{}``  from  path  format
    strings.
    """
    def  helper(func):
      if  cls.template_funcs  is  None:
        cls.template_funcs  =  {}
      cls.template_funcs[name]  =  func
      return  func
    return  helper



Clone # 430
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 141
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 107
return  render_modal_workflow(
  request,
  'wagtailadmin/chooser/email_link.html',  'wagtailadmin/chooser/email_link.js',
  {
    'querystring':  get_querystring(request),
    'allow_external_link':  request.GET.get('allow_external_link'),
    'form':  form,
  }
)
  return  render_modal_workflow(
    request,
 
  'wagtailadmin/chooser/external_link.html',  'wagtailadmin/chooser/external_link.js',
    {
      'querystring':  get_querystring(request),
      'allow_email_link':  request.GET.get('allow_email_link'),
      'form':  form,
    }
  )



Clone # 431
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/image_ops.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/image_ops.py"
The first line is 45
horz_scale  =  float(target_width)  /  original_width horz_scale  =  float(target_width)  /  original_width
  vert_scale  =  float(target_height)  /  original_height
  vert_scale  =  float(target_height)  /  original_height
  if  horz_scale  >  vert_scale:
    final_size  =  (target_width,  int(original_height  *  horz_scale))
  else:
    final_size  =  (int(original_width  *  vert_scale),  target_height)
  if  horz_scale  <  vert_scale:
    final_size  =  (target_width,  int(original_height  *  horz_scale))
  else:
    final_size  =  (int(original_width  *  vert_scale),  target_height)
  return  resize(image,  final_size)

  return  resize(image,  final_size)



Clone # 432
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 37
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 33
if  orphans:
  print  "Orphaned  pages  found:  %r"  %  orphans
if  bad_alpha:
  print  "Invalid  characters  found  in  path  for  pages:  %r"  %  bad_alpha
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path
  if  bad_numchild:
    print  "Incorrect  numchilvalue  found  for  pages:  %r"  %  bad_numchild
if  orphans:
  print  "Orphanepages  found:  %r"  %  orphans



Clone # 433
Distance between two fragments = 1
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 514
Source file "../tests/beets/ui/commands.py"
The first line is 391
  if  penalties:
    line.append(penalties)
if  penalties:
  info.append(penalties)
disambig  =  disambig_string(match.info) disambig  =  disambig_string(match.info)
  if  disambig:
    line.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
if  disambig:
  info.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
  print_('  '.join(line))
  print_('  '.join(info))



Clone # 434
Distance between two fragments = 1
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 514
Source file "../tests/beets/ui/commands.py"
The first line is 243
  if  penalties:
    line.append(penalties)
if  penalties:
  info.append(penalties)
disambig  =  disambig_string(match.info) disambig  =  disambig_string(match.info)
  if  disambig:
    line.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
if  disambig:
  info.append(ui.colorize('lightgray',  '(%s)'  %  disambig))
  print_('  '.join(line))
  print_('  '.join(info))



Clone # 435
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 105
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 126
self.assertEqual(response.status_code,  200) self.assertEqual(response.status_code,  200)
self.assertEqual(response.templates[0].name,  'tests/event_page.html') self.assertEqual(response.templates[0].name,  'tests/event_page.html')
christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/') christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/')
  self.assertEqual(response.context['self'],  christmas_page)
  self.assertEqual(response.context['self'],  christmas_page)
self.assertContains(response,  '<h1>Christmas</h1>') self.assertContains(response,  '<h1>Christmas</h1>')
  self.assertContains(response,  '<h2>Event</h2>')
  self.assertContains(response,  '<h2>Event</h2>')



Clone # 436
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/tests/service_test.py"
The first line is 14
Source file "../tests/fig/tests/service_test.py"
The first line is 10
self.assertRaises(ConfigError,  lambda:  Service(name='!'))   self.assertRaises(ConfigError,  lambda:  Service(name=''))
self.assertRaises(ConfigError,  lambda:  Service(name='\xe2')) self.assertRaises(ConfigError,  lambda:  Service(name='  '))
self.assertRaises(ConfigError,  lambda:  Service(name='_')) self.assertRaises(ConfigError,  lambda:  Service(name='/'))
self.assertRaises(ConfigError,  lambda:  Service(name='____')) self.assertRaises(ConfigError,  lambda:  Service(name='!'))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar')) self.assertRaises(ConfigError,  lambda:  Service(name='\xe2'))
  self.assertRaises(ConfigError,  lambda:  Service(name='__foo_bar__'))
self.assertRaises(ConfigError,  lambda:  Service(name='_'))



Clone # 437
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 202
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 125
messages.success(
  request,
  _("{snippet_type}  '{instance}'  deleted.").format(
    snippet_type=capfirst(snippet_type_name),
    instance=instance
  )
)
messages.success(
  request,
  _("{snippet_type}  '{instance}'  created.").format(
    snippet_type=capfirst(get_snippet_type_name(content_type)[0]),
    instance=instance
  )
)
  return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)
return  redirect('wagtailsnippets_list',  content_type.app_label,  content_type.model)



Clone # 438
Distance between two fragments = 4
Clone size = 6
Source file "../tests/beets/importer.py"
The first line is 301
Source file "../tests/beets/importer.py"
The first line is 298
  def  choose_match(self,  task):
    raise  NotImplementedError
  def  should_resume(self,  path):
    raise  NotImplementedError
  def  resolve_duplicate(self,  task):
    raise  NotImplementedError
  def  choose_match(self,  task):
    raise  NotImplementedError
  def  choose_item(self,  task):
    raise  NotImplementedError
  def  resolve_duplicate(self,  task):
    raise  NotImplementedError



Clone # 439
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 510
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 522
  def  _prepare_pos_var_for_add_sibling(self,  pos):
    return  self._prepare_pos_var(
      pos,
      'add_sibling',
      self._valid_pos_for_add_sibling,
      self._valid_pos_for_sorted_add_sibling)
  def  _prepare_pos_var_for_move(self,  pos):
    return  self._prepare_pos_var(
      pos,
      'move',
      self._valid_pos_for_move,
      self._valid_pos_for_sorted_move)



Clone # 440
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 112
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 93
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
sib_order  =  models.PositiveIntegerField() sib_order  =  models.PositiveIntegerField()
desc  =  models.CharField(max_length=255)   desc  =  models.CharField(max_length=255)



Clone # 441
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 112
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 81
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
sib_order  =  models.PositiveIntegerField() sib_order  =  models.PositiveIntegerField()
desc  =  models.CharField(max_length=255)   desc  =  models.CharField(max_length=255)



Clone # 442
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 709
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 701
  def  can_publish(self):
    if  not  self.user.is_active:
      return  False
    if  self.page_is_root:
      return  False

    return  self.user.is_superuser  or  ('publish'  in  self.permissions)
  def  can_unpublish(self):
    if  not  self.user.is_active:
      return  False
    if  (not  self.page.live)  or  self.page_is_root:
      return  False

    return  self.user.is_superuser  or  ('publish'  in  self.permissions)



Clone # 443
Distance between two fragments = 2
Clone size = 6
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 127
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 103
  try:
    sort_service_dicts(services)
  except  DependencyError  as  e:
    self.assertIn('a',  e.msg)
    self.assertIn('b',  e.msg)
  else:
    self.fail('Should  have  thrown  an  DependencyError')
  try:
    sort_service_dicts(services)
  except  DependencyError  as  e:
    self.assertIn('redis',  e.msg)
    self.assertIn('web',  e.msg)
  else:
    self.fail('Should  have  thrown  an  DependencyError')



Clone # 444
Distance between two fragments = 2
Clone size = 6
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 127
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 80
  try:
    sort_service_dicts(services)
  except  DependencyError  as  e:
    self.assertIn('a',  e.msg)
    self.assertIn('b',  e.msg)
  else:
    self.fail('Should  have  thrown  an  DependencyError')
  try:
    sort_service_dicts(services)
  except  DependencyError  as  e:
    self.assertIn('redis',  e.msg)
    self.assertIn('web',  e.msg)
  else:
    self.fail('Should  have  thrown  an  DependencyError')



Clone # 445
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 110
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 92
  response  =  self.client.post(reverse('wagtailadmin_pages_create',  args=('tests',  'simplepage',  self.root_page.id)),  post_data)
  response  =  self.client.post(reverse('wagtailadmin_pages_create',  args=('tests',  'simplepage',  self.root_page.id)),  post_data)
  self.assertEqual(response.status_code,  302)
  self.assertEqual(response.status_code,  302)
page  =  Page.objects.get(path__startswith=self.root_page.path,  slug='hello-world').specific page  =  Page.objects.get(path__startswith=self.root_page.path,  slug='hello-world').specific
self.assertEqual(page.title,  post_data['title']) self.assertEqual(page.title,  post_data['title'])
self.assertIsInstance(page,  SimplePage) self.assertIsInstance(page,  SimplePage)
  self.assertTrue(page.live)
  self.assertFalse(page.live)



Clone # 446
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 46
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 42
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=moderators_group,  page=root,  permission_type='publish')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='add')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=editors_group,  page=root,  permission_type='add')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='edit')
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=editors_group,  page=root,  permission_type='edit')

  orm['wagtailcore.grouppagepermission'].objects.create(
    group=moderators_group,  page=root,  permission_type='publish')



Clone # 447
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 3
from  django.contrib  import  messages from  django.contrib.auth.decorators  import  permission_required
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib  import  messages
from  django.core.exceptions  import  PermissionDenied from  django.db.models  import  Q
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm



Clone # 448
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 3
from  django.contrib  import  messages from  django.contrib.auth.decorators  import  permission_required
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib  import  messages
from  django.core.exceptions  import  PermissionDenied from  django.db.models  import  Q
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm



Clone # 449
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/importer.py"
The first line is 28
Source file "../tests/beets/ui/__init__.py"
The first line is 33
from  beets  import  dbcore from  beets  import  library
from  beets  import  plugins from  beets  import  plugins
from  beets  import  util from  beets  import  util
from  beets  import  config from  beets.util.functemplate  import  Template
from  beets.util  import  pipeline from  beets  import  config
from  beets.util  import  syspath,  normpath,  displayable_path from  beets.util  import  confit



Clone # 450
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib.auth  import  get_user_model from  django.contrib  import  messages
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib  import  messages from  django.utils.translation  import  ugettext    as  _
 
from  django.db.models  import  Q from  wagtail.wagtailadmin.edit_handlers  import  ObjectList



Clone # 451
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 4
from  django.contrib.auth.decorators  import  permission_required from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.core.exceptions  import  PermissionDenied from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext  a_
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtaildocs.models  import  Document from  wagtail.wagtaildocs.models  import  Document
from  wagtail.wagtaildocs.forms  import  DocumentForm
 
 
from  wagtail.wagtaildocs.forms  import  DocumentForm
 
 



Clone # 452
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 1
from  django.shortcuts  import  get_object_or_404,  render from  django.shortcuts  import  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtaildocs.models  import  Document from  wagtail.wagtailsearch  import  models
 
 



Clone # 453
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 1
from  django.shortcuts  import  get_object_or_404,  render from  django.shortcuts  import  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailimages.models  import  get_image_model from  wagtail.wagtailsearch  import  models
 
 



Clone # 454
Distance between two fragments = 4
Clone size = 6
Source file "../tests/fig/fig/cli/utils.py"
The first line is 1
Source file "../tests/fig/setup.py"
The first line is 3
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
from  __future__  import  division from  setuptools  import  setup,  find_packages
import  datetime import  re
import  os import  os
import  socket import  codecs
 
 



Clone # 455
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/service.py"
The first line is 1
Source file "../tests/fig/setup.py"
The first line is 3
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
from  .packages.docker.client  import  APIError from  setuptools  import  setup,  find_packages
import  logging import  re
import  re import  os
import  os import  codecs
 
 



Clone # 456
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/main.py"
The first line is 1
Source file "../tests/fig/fig/cli/utils.py"
The first line is 2
from  __future__  import  print_function from  __future__  import  absolute_import
from  __future__  import  unicode_literals from  __future__  import  division
import  logging import  datetime
import  sys import  os
import  re import  socket
import  signal
 
import  subprocess



Clone # 457
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  sys import  logging
import  tty import  sqlite3
import  fcntl import  errno
import  os import  re
import  termios import  struct
import  threading import  traceback
 



Clone # 458
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  platform import  logging
import  os import  sqlite3
import  pkgutil import  errno
import  sys import  re
import  yaml import  struct
import  types import  traceback
 



Clone # 459
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
from  __future__  import  division
 
from  __future__  import  division
import  os import  datetime
import  sys import  os
import  re import  socket
import  shutil import  subprocess
import  fnmatch import  platform



Clone # 460
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/beets/util/__init__.py"
The first line is 16
from  __future__  import  unicode_literals from  __future__  import  division
 
import  platform import  os
import  os import  sys
import  pkgutil import  re
import  sys import  shutil
import  yaml import  fnmatch



Clone # 461
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/fig/fig/cli/command.py"
The first line is 4
from  __future__  import  unicode_literals from  requests.exceptions  import  ConnectionError
import  platform import  errno
import  os import  logging
import  pkgutil import  os
import  sys import  re
import  yaml import  yaml



Clone # 462
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
from  __future__  import  unicode_literals from  __future__  import  division
import  platform import  datetime
import  os import  os
import  pkgutil import  socket
import  sys import  subprocess
import  yaml import  platform



Clone # 463
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/__init__.py"
The first line is 25
Source file "../tests/fig/fig/cli/command.py"
The first line is 4
from  difflib  import  SequenceMatcher from  requests.exceptions  import  ConnectionError
import  logging import  errno
import  sqlite3 import  logging
import  errno import  os
import  re import  re
import  struct import  yaml



Clone # 464
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/util/__init__.py"
The first line is 16
from  __future__  import  print_function
 
from  __future__  import  division
 
import  logging import  os
import  os import  sys
import  time import  re
import  itertools import  shutil
import  codecs import  fnmatch



Clone # 465
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
from  __future__  import  print_function
 
from  __future__  import  division
import  logging import  datetime
import  os import  os
import  time import  socket
import  itertools import  subprocess
import  codecs import  platform



Clone # 466
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/util/__init__.py"
The first line is 16
from  __future__  import  print_function from  __future__  import  division
 
import  sys import  os
import  tty import  sys
import  fcntl import  re
import  os import  shutil
import  termios import  fnmatch



Clone # 467
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
from  __future__  import  print_function from  __future__  import  division
import  sys import  datetime
import  tty import  os
import  fcntl import  socket
import  os import  subprocess
import  termios import  platform



Clone # 468
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/__init__.py"
The first line is 19
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  locale import  os
import  optparse import  logging
import  textwrap import  pickle
import  sys import  itertools
from  difflib  import  SequenceMatcher from  collections  import  defaultdict
 



Clone # 469
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 597
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 579
revision  =  get_object_or_404(PageRevision,  id=revision_id) revision  =  get_object_or_404(PageRevision,  id=revision_id)
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(  revision.page.title))
    return  redirect('wagtailadmin_home')
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(revision.page.title))
    return  redirect('wagtailadmin_home')



Clone # 470
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 597
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 616
revision  =  get_object_or_404(PageRevision,  id=revision_id) revision  =  get_object_or_404(PageRevision,  id=revision_id)
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(  revision.page.title))
    return  redirect('wagtailadmin_home')
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(revision.page.title))
    return  redirect('wagtailadmin_home')



Clone # 471
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 579
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 616
revision  =  get_object_or_404(PageRevision,  id=revision_id) revision  =  get_object_or_404(PageRevision,  id=revision_id)
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.page.permissions_for_user(request.user).can_publish():
    raise  PermissionDenied
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(revision.page.title))
    return  redirect('wagtailadmin_home')
  if  not  revision.submitted_for_moderation:
    messages.error(request,  _("The  page  '{0}'  is  not  currently  awaiting  moderation.").format(revision.page.title))
    return  redirect('wagtailadmin_home')



Clone # 472
Distance between two fragments = 3
Clone size = 6
Source file "../tests/fig/fig/packages/six.py"
The first line is 364
Source file "../tests/fig/fig/packages/six.py"
The first line is 370
sep  =  kwargs.pop("sep",  None) end  =  kwargs.pop("end",  None)
if  sep  is  not  None:
  if  isinstance(sep,  unicode):
    want_unicode  =  True
  elif  not  isinstance(sep,  str):
    raise  TypeError("sep  must  be  None  or  a  string")
if  end  is  not  None:
  if  isinstance(end,  unicode):
    want_unicode  =  True
  elif  not  isinstance(end,  str):
    raise  TypeError("end  must  be  None  or  a  string")



Clone # 473
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 149
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 191
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()
  snippet_type_name  =  get_snippet_type_name(content_type)[0]
  snippet_type_name  =  get_snippet_type_name(content_type)[0]
instance  =  get_object_or_404(model,  id=id)   instance  =  get_object_or_404(model,  id=id)



Clone # 474
Distance between two fragments = 3
Clone size = 6
Source file "../tests/fig/tests/service_test.py"
The first line is 256
Source file "../tests/fig/tests/service_test.py"
The first line is 254
service.scale(3) service.scale(1)
self.assertEqual(len(service.containers()),  3) self.assertEqual(len(service.containers()),  1)
service.scale(1) service.scale(3)
self.assertEqual(len(service.containers()),  1) self.assertEqual(len(service.containers()),  3)
service.scale(0) service.scale(1)
  self.assertEqual(len(service.containers()),  0)
self.assertEqual(len(service.containers()),  1)



Clone # 475
Distance between two fragments = 0
Clone size = 6
Source file "../tests/beets/mediafile.py"
The first line is 775
Source file "../tests/beets/mediafile.py"
The first line is 740
pic  =  mutagen.flac.Picture() pic  =  mutagen.flac.Picture()
pic.data  =  image.data pic.data  =  image.data
pic.type  =  image.type_index  or  3    #  Front  cover pic.type  =  image.type_index  or  3    #  Front  cover
pic.mime  =  image.mime_type pic.mime  =  image.mime_type
pic.desc  =  image.desc  or  u'' pic.desc  =  image.desc  or  u''
  return  pic


return  pic



Clone # 476
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_backends.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_backends.py"
The first line is 44
testc  =  models.SearchTestChild() testb  =  models.SearchTest()
testc.title  =  "Hello" testb.title  =  "Hello"
testc.live  =  True testb.live  =  True
  testc.save()
  testb.save()
testd  =  models.SearchTestChild() testc  =  models.SearchTestChild()
testd.title  =  "World" testc.title  =  "Hello"



Clone # 477
Distance between two fragments = 2
Clone size = 6
Source file "../tests/beets/plugins.py"
The first line is 301
Source file "../tests/beets/plugins.py"
The first line is 339
def  template_funcs():
    """Get  all  the  template  functions  declared  by  plugins  as  a
    dicti
onary.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.template_funcs:
     
  funcs.update(plugin.template_funcs)
    return  funcs
 
def  album_field_getters():
    """As  above,  for  album  fields.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.album_template_fields:
       
funcs.update(plugin.album_template_fields)
    return
  funcs
 
 



Clone # 478
Distance between two fragments = 2
Clone size = 6
Source file "../tests/beets/plugins.py"
The first line is 301
Source file "../tests/beets/plugins.py"
The first line is 329
def  template_funcs():
    """Get  all  the  template  functions  declared  by  plugins  as  a
    dictionary
.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.template_funcs:
        funcs.update(plugin.template_funcs)
    return  funcs
 
def  item_field_getters():
    """Get  a  dictionary  mapping  field  names  to  unary  functions  that
    compute  the  field's  value
.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.template_fields:
        funcs.update(plugin.template_fields)
    return  funcs
 



Clone # 479
Distance between two fragments = 2
Clone size = 6
Source file "../tests/beets/plugins.py"
The first line is 339
Source file "../tests/beets/plugins.py"
The first line is 329
def  album_field_getters():
    """As  above,  for  album  fields.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.album_template_fields:
        funcs.update(plugin.album_template_fields)
    return  funcs
 
 
def  item_field_getters():
    """Get  a  dictionary  mapping  field  names  to  unary  functions  that
    compute  the  field's 
value.
    """
    funcs  =  {}
    for  plugin  in  find_plugins():
      if  plugin.template_fields:
        funcs.update(plugin.template_fields)
    return  funcs
 



Clone # 480
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 61
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 605
  try:
    if  update:
      del  self._cached_depth
    else:
      return  self._cached_depth
  except  AttributeError:
    pass
try:
  if  update:
    del  self._cached_parent_obj
  else:
    return  self._cached_parent_obj
except  AttributeError:
  pass



Clone # 481
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 988
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 605
try:
  if  update:
    del  self._cached_parent_obj
  else:
    return  self._cached_parent_obj
except  AttributeError:
  pass
try:
  if  update:
    del  self._cached_parent_obj
  else:
    return  self._cached_parent_obj
except  AttributeError:
  pass



Clone # 482
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 150
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 136
node_order_by  =  ['val1',  'val2',  'desc'] node_order_by  =  ['val1',  'val2',  'desc']
val1  =  models.IntegerField() val1  =  models.IntegerField()
val2  =  models.IntegerField() val2  =  models.IntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 483
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 150
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 126
node_order_by  =  ['val1',  'val2',  'desc'] node_order_by  =  ['val1',  'val2',  'desc']
val1  =  models.IntegerField() val1  =  models.IntegerField()
val2  =  models.IntegerField() val2  =  models.IntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 484
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 136
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 126
node_order_by  =  ['val1',  'val2',  'desc'] node_order_by  =  ['val1',  'val2',  'desc']
val1  =  models.IntegerField() val1  =  models.IntegerField()
val2  =  models.IntegerField() val2  =  models.IntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 485
Distance between two fragments = 5
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 247
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 197
  def  test_delete(self):
    response  =  self.post({
      'hello':  'world'
    })

    #  Should  redirect  back  to  index
    self.assertEqual(response.status_code,  302)

    #  Check  that  the  image  was  deleted
    images  =  Image
.objects.filter(title="Test  image")
    self.assertEqual(images.count(),  0)

  def  test_delete(self):
    response  =  self.post({
      'hello':  'world'
    })

    #  Should  redirect  back  to  index
    self.assertEqual(response.status_code,  302)

    #  Check  that  the  redirect  was  deleted
    redirects  = 
models.Redirect.objects.filter(old_path='/test')
    self.assertEqual(redirects.count(),  0)



Clone # 486
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 487
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 488
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 489
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 490
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 491
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 492
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 493
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 494
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 495
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 496
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 497
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 498
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 499
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 500
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 501
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 502
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 503
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 504
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 505
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 506
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 507
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 508
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 509
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 510
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 511
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 512
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 513
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 514
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    #  Login

    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 515
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 516
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 517
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 518
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 519
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 520
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 521
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 522
Distance between two fragments = 2
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/models.py"
The first line is 43
Source file "../tests/wagtail/wagtail/wagtailimages/models.py"
The first line is 95
  def  is_editable_by_user(self,  user):
    if  user.has_perm('wagtaildocs.change_document'):
      #  user  has  global  permission  to  change  documents
      return  True
    elif  user.has_perm('wagtaildocs.add_document')  and  self.uploaded_by_user  ==  user:
      #  user  has  document  add  permission,  which  also  implicitly  provides  permission  to  edit  their  own  documents
      return  True
    else:
      return  False

  def  is_editable_by_user(self,  user):
    if  user.has_perm('wagtailimages.change_image'):
      #  user  has  global  permission  to  change  images
      return  True
    elif  user.has_perm('wagtailimages.add_image')  and  self.uploaded_by_user  ==  user:
      #  user  has  image  add  permission,  which  also  implicitly  provides  permission  to  edit  their  own  images
      return  True
    else:
      return  False



Clone # 523
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 104
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
def  mpsortedautonow_model(request):
    return  _prepare_db_test(request)
 
 
def  model(request):
    return  _prepare_db_test(request)
 
 
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 
def  model_with_unicode(request):
    return  _prepare_db_test(request)
 
 



Clone # 524
Distance between two fragments = 5
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 132
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 88
  if  request.POST:
    doc.delete()
    messages.success(request,  _("Document  '{0}'  deleted.").format(doc.title))
    return  redirect('wagtaildocs_index')
  if  request.POST:
    theredirect.delete()
    messages.success(request,  _("Redirect  '{0}'  deleted.").format(theredirect.title))
    return  redirect('wagtailredirects_index')
return  render(request,  "wagtaildocs/documents/confirm_delete.html",  {
  'document':  doc,
})
  return  render(request,  "wagtailredirects/confirm_delete.html",  {
    'redirect':  theredirect,
  })



Clone # 525
Distance between two fragments = 5
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 88
  if  request.POST:
    image.delete()
    messages.success(request,  _("Image  '{0}'  deleted.").format(image.title))
    return  redirect('wagtailimages_index')
  if  request.POST:
    theredirect.delete()
    messages.success(request,  _("Redirect  '{0}'  deleted.").format(theredirect.title))
    return  redirect('wagtailredirects_index')
  return  render(request,  "wagtailimages/images/confirm_delete.html",  {
    'image':  image,
  })

  return  render(request,  "wagtailredirects/confirm_delete.html",  {
    'redirect':  theredirect,
  })



Clone # 526
Distance between two fragments = 3
Clone size = 6
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 27
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 89
  services  =  [
    {
      'links':  ['redis',  'postgres'],
      'name':  'web'
    },
    {
      'name':  'postgres',
      'links':  ['redis']
    },
    {
      'name':  'redis'
    }
  ]
  services  =  [
    {
      'links':  ['postgres',  'redis'],
      'name':  'web'
    },
    {
      'name':  'redis',
      'links':  ['web']
    },
    {
      'name':  'postgres'
    }
  ]



Clone # 527
Distance between two fragments = 4
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 1236
Source file "../tests/beets/ui/commands.py"
The first line is 910
  try:
    item.write()
  except  Exception  as  exc:
    log.error(u'could  not  write  {0}:  {1}'.format(
      util.displayable_path(item.path),  exc
   
))
    continue
  try:
    item.read()
  except  Exception  as  exc:
    log.error(u'error  reading  {0}:  {1}'.format(
      displayable_path(item.path),  exc))
    continue



Clone # 528
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 439
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 450
class  BaseObjectList(BaseCompositeEditHandler):
    template  =  "wagtailadmin/edit_handlers/object_list.html"
 
 
class  BaseMultiFieldPanel(BaseCompositeEditHandler):
    template  =  "wagtailadmin/edit_handlers/multi_field_panel.html"
 
 
def  ObjectList(children,  heading=""):
    return  type('_ObjectList',  (BaseObjectList,),  {
      'children':  children,
      'heading':  heading,
    })
 
 
def  MultiFieldPanel(children,  heading=""):
    return  type('_MultiFieldPanel',  (BaseMultiFieldPanel,),  {
      'children':  children,
      'heading':  heading,
    })
 
 



Clone # 529
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 82
Source file "../tests/beets/util/bluelet.py"
The first line is 87
class  KillEvent(Event):
    """Unschedule  a  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  thread,  start  a  new  thread  and,
    once  the  child  thread  finished,  return  control  to  the  parent
 
  thread.
   
"""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  threadstart  a  new  thread  and,
    once  the  child  thread  finished,  return  control  to  the  parent
    thread.
    """
    def  __init__(self,  coro
):
      self.spawned  =  coro
 
class  ReturnEvent(Event):
    """Return  a  value  the  current  thread's  delegator  at  the  point  of
    delegation.  Ends  the 
current  (delegate)  thread.
    """
    def  __init__(self
value):
      self.value  =  value
 



Clone # 530
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 75
Source file "../tests/beets/util/bluelet.py"
The first line is 87
class  JoinEvent(Event):
    """Suspend  the  thread  until  the  specified  child  thread  has
    complete
d.
    """
    def  __init__(self,  child):
      self.child  =  child
 
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  thread,  start  a  new  thread  and,
    once  the  child  thread  finished,  return  control  to  the 
parent
    threa
d.
    """
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  KillEvent(Event):
    """Unschedule  a  child  thread."""
    def  __init__(self,  child):
      self.child  =  child
 
class  ReturnEvent(Event):
    """Return  a  value  the  current  thread's  delegator  at  the  point  of
    delegation.  Ends  the
  current  (delegate)  thread.
   
"""
    def  __init__(self,  value):
      self.value  =  value
 



Clone # 531
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 87
Source file "../tests/beets/util/bluelet.py"
The first line is 60
class  DelegationEvent(Event):
    """Suspend  execution  of  the  current  thread,  stara  new  thread  and,
    once  the  child  thread  f
inished,  return  control  to  the  parent
    thread
.
   
"""
    def  __init__(self,  coro):
      self.spawned  =  coro
 
class  ValueEvent(Event):
    """An  event  thadoes  nothing  but  return  a  fixed  value."""
    def  __init__(self,  value):
      self.value  =  value
 
class  ReturnEvent(Event):
    """Retura  value  the  current  thread's  delegator  at  the  point  of
    delegation
Ends  the  current  (delegate)  thread.
   
"""
    def  __init__(self,  value):
      self.value  =  value
 
class  ExceptionEvent(Event):
    """Raise  aexception  at  the  yield  pointUsed  internally."""
    def  __init__(self,  exc_info):
      self.exc_info  =  exc_info
 



Clone # 532
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 201
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 206
class  MP_TestNode_Proxy(MP_TestNode):
    class  Meta:
      proxy  =  True
 
 
class  NS_TestNode_Proxy(NS_TestNode):
    class  Meta:
      proxy  =  True
 
 
class  NS_TestNode_Proxy(NS_TestNode):
    class  Meta:
      proxy  =  True
 
 
class  AL_TestNode_Proxy(AL_TestNode):
    class  Meta:
      proxy  =  True
 
 



Clone # 533
Distance between two fragments = 0
Clone size = 6
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 63
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 117
image  =  models.ForeignKey(
  'wagtailimages.Image',
  null=True,
  blank=True,
  on_delete=models.SET_NULL,
  related_name='+'
)
  image  =  models.ForeignKey(
    'wagtailimages.Image',
    null=True,
    blank=True,
    on_delete=models.SET_NULL,
    related_name='+'
  )



Clone # 534
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 63
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 152
image  =  models.ForeignKey(
  'wagtailimages.Image',
  null=True,
  blank=True,
  on_delete=models.SET_NULL,
  related_name='+'
)
  feed_image  =  models.ForeignKey(
    'wagtailimages.Image',
    null=True,
    blank=True,
    on_delete=models.SET_NULL,
    related_name='+'
  )



Clone # 535
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 117
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 152
  image  =  models.ForeignKey(
    'wagtailimages.Image',
    null=True,
    blank=True,
    on_delete=models.SET_NULL,
    related_name='+'
  )
  feed_image  =  models.ForeignKey(
    'wagtailimages.Image',
    null=True,
    blank=True,
    on_delete=models.SET_NULL,
    related_name='+'
  )



Clone # 536
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 90
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 82
  def  test_route_to_unpublished_page_returns_404(self):
    homepage  =  Page.objects.get(url_path='/home/')

    request  =  HttpRequest()
    request.path  =  '/events/tentative-unpublished-event/'
    with  self.assertRaises(Http404):
      homepage.route(request,  ['events',  'tentative-unpublished-event'])

  def  test_route_to_unknown_page_returns_404(self):
    homepage  =  Page.objects.get(url_path='/home/')

    request  =  HttpRequest()
    request.path  =  '/events/quinquagesima/'
    with  self.assertRaises(Http404):
      homepage.route(request,  ['events',  'quinquagesima'])



Clone # 537
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 38
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 25
class  FriendlyTimeInput(forms.TimeInput):
    """
    A  custom  TimeInput  widget  that  formats  dates  as  "5.30pm"
    and  adds  class="friendly_time"  to  be  picked  up  by  jquery  timepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'friendly_time'}
      if  attrs:
        default_attrs.update(attrs)
 
      super(FriendlyTimeInput,  self).__init__(attrs=default_attrs,  format='%I.%M%p')
 
 
class  FriendlyDateInput(forms.DateInput):
    """
    A  custom  DateInput  widget  that  formats  dates  as  "05  Oct  2013"
    and  adds  class="friendly_date"  to  be  picked  up  by  jquery  datepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'friendly_date'}
      if  attrs:
        default_attrs.update(attrs)
 
      super(FriendlyDateInput,  self).__init__(attrs=default_attrs,  format='%%%Y')
 
 



Clone # 538
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 38
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 96
class  FriendlyTimeInput(forms.TimeInput):
    """
    A  custom  TimeInput  widget  that  formats  dates  as  "5.30pm"
    and  adds  class="friendly_time"  to  be  picked  up  by  jquery  timepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'friendly_time'}
      if  attrs:
        default_attrs.update(attrs)
 
      super(FriendlyTimeInput,  self).__init__(attrs=default_attrs,  format='%I.%M%p')
 
 
class  LocalizedTimeInput(forms.TimeInput):
    """
    A  custom  TimeInput  widget  that  formats  dates  as  "5.30pm"
    and  adds  class="friendly_time"  to  be  picked  up  by  jquery  timepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'localized_time'}
      if  attrs:
        default_attrs.update(attrs)
      #  Just  use  24-hour  format
      super(LocalizedTimeInput,  self).__init__(attrs=default_attrs,  format='%H:%M')
 
 



Clone # 539
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 25
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 96
class  FriendlyDateInput(forms.DateInput):
    """
    A  custom  DateInput  widget  that  formats  dates  as  "05  Oct  2013"
    and  adds  class="friendly_date"  to  be  picked  up  by  jquery  datepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'friendly_date'}
      if  attrs:
        default_attrs.update(attrs)
 
      super(FriendlyDateInput,  self).__init__(attrs=default_attrs,  format='%%b  %Y')
 
 
class  LocalizedTimeInput(forms.TimeInput):
    """
    A  custom  TimeInput  widget  that  formats  dates  as  "5.30pm"
    and  adds  class="friendly_time"  to  be  picked  up  by  jquery  timepicker.
    """
    def  __init__(self,  attrs=None):
      default_attrs  =  {'class':  'localized_time'}
      if  attrs:
        default_attrs.update(attrs)
      #  Just  use  24-hour  format
      super(LocalizedTimeInput,  self).__init__(attrs=default_attrs,  format='%H:%M')
 
 



Clone # 540
Distance between two fragments = 3
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2048
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2056
  def  test_treebeard_css(self):
    template  =  Template("{%  load  admin_tree  %}{%  treebeard_css  %}")
    context  =  Context()
    rendered  =  template.render(context)
    expected  =  ('<link  rel="stylesheet"  type="text/css"  '
      'href
="/treebeard/treebeard-admin.css"/>')
    assert  expected  ==  rendered
  def  test_treebeard_js(self):
    template  =  Template("{%  load  admin_tree  %}{%  treebeard_js  %}")
    context  =  Context()
    rendered  =  template.render(context)
    expected  =  ('<script  type="text/javascript"  src="jsi18n"></script>'
      '<script  type="text/javascript"  '
      'src="/treebeard/treebeard-admin.js"></script>'
      '<script>(function($){'
      'jQuery  =  $.noConf
lict(true);'
      '})(django.jQuer
y);</script>'
      '<script
  type="text/javascript"  '
      'src
="/treebeard/jquery-ui-1.8.5.custom.min.js"></script>')
    assert  expected  ==  rendered



Clone # 541
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 1149
Source file "../tests/beets/ui/commands.py"
The first line is 866
modify_cmd.parser.add_option('-a',  '--album',  action='store_true',
  help='modify  whole  albums  instead  of  tracks')
list_cmd.parser.add_option('-a',  '--album',  action='store_true',
  help='show  matching  albums  instead  of  tracks')
modify_cmd.parser.add_option('-y',  '--yes',  action='store_true',
  help='skip  confirmation')
list_cmd.parser.add_option('-p',  '--path',  action='store_true',
  help='print  paths  for  matched  items  or  albums')
modify_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)
list_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)



Clone # 542
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailembeds/tests.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 9
class  TestChooser(TestCase):
    def  setUp(self):
      #  login
      login(self.client)
 
    def  test_c
hooser(self):
      r  =  self.client.get(
'/admin/embeds/chooser/')
      self.assertEqual(r.status_code,  200)
 
class  TestHome(TestCase):
    def  setUp(self):
      #  Login
      login(self.client)
 
    def  test_status_code(self):
      response  =  self.client.get(reverse('wagtailadmin_
home'))
      self.assertEqual(response.status_code,  200)
 
 



Clone # 543
Distance between two fragments = 4
Clone size = 6
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 117
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 141
username,  password  =  decode_auth(entry['auth']) username,  password  =  decode_auth(data[0])
conf[registry]  =  {
  'username':  username,
  'password':  password,
  'email':  entry['email'],
  'serveraddress':  registry,
}
conf[INDEX_URL]  =  {
  'username':  username,
  'password':  password,
  'email':  data[1],
  'serveraddress':  INDEX_URL,
}



Clone # 544
Distance between two fragments = 1
Clone size = 6
Source file "../tests/beets/importer.py"
The first line is 988
Source file "../tests/beets/importer.py"
The first line is 710
  if  task.choice_flag  in  (action.ASIS,  action.APPLY):
    ident  =  task.chosen_ident()
    if  ident  in  recent  or  _item_duplicate_check(session.lib,  task):
      session.resolve_duplicate(task)
      session.log_choice(task,  True)
    recent.add(ident)
  if  task.choice_flag  in  (action.ASIS,  action.APPLY):
    ident  =  task.chosen_ident()
    #  The  "recent"  set  keeps  track  of  identifiers  for  recently
    #  i
mported  albums  --  those  that  haven't  reached  the  database
    #  yet.
    if  ident  in  recent  or 
_duplicate_check(session.lib,  task):
      session.resolve_duplicate(task)
      session.log_choice(task,  True)
    recent.add(ident)



Clone # 545
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2373
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2364
target  =  model.objects.get(desc='231') node  =  model.objects.get(desc='231')
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={}) request  =  self._mocked_request(data={})
response  =  admin_obj.try_to_move_node(True,  node,  'first-sibling',
  request,  target)
response  =  admin_obj.try_to_move_node(True,  node,  'invalid_pos',
  request,  target=node)
  assert  response.status_code  ==  400
  assert  response.status_code  ==  400



Clone # 546
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2373
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2352
target  =  model.objects.get(desc='231') node  =  model.objects.get(desc='231')
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={}) request  =  self._mocked_request(data={})
response  =  admin_obj.try_to_move_node(True,  node,  'first-sibling',
  request,  target)
response  =  admin_obj.try_to_move_node(True,  node,  'sorted-child',
  request,  target=node)
  assert  response.status_code  ==  400
  assert  response.status_code  ==  400



Clone # 547
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2364
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2352
node  =  model.objects.get(desc='231') node  =  model.objects.get(desc='231')
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={}) request  =  self._mocked_request(data={})
response  =  admin_obj.try_to_move_node(True,  node,  'invalid_pos',
  request,  target=node)
response  =  admin_obj.try_to_move_node(True,  node,  'sorted-child',
  request,  target=node)
  assert  response.status_code  ==  400
  assert  response.status_code  ==  400



Clone # 548
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2344
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2406
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={'node_id':  1,
  'sibling_id':  2,
  'as_child':  'invalid'})
request  =  self._mocked_request(data={'node_id':  node.pk,
  'sibling_id':  target.pk,
  'as_child':  1})
response  =  admin_obj.move_node(request) response  =  admin_obj.move_node(request)
  assert  response.status_code  ==  400
assert  response.status_code  ==  200



Clone # 549
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2344
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2384
admin_obj  =  self._get_admin_obj(model) admin_obj  =  self._get_admin_obj(model)
request  =  self._mocked_request(data={'node_id':  1,
  'sibling_id':  2,
  'as_child':  'invalid'})
request  =  self._mocked_request(data={'node_id':  node.pk,
  'sibling_id':  target.pk,
  'as_child':  0})
response  =  admin_obj.move_node(request) response  =  admin_obj.move_node(request)
  assert  response.status_code  ==  400
assert  response.status_code  ==  200



Clone # 550
Distance between two fragments = 1
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 44
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 13
self.user  =  User.objects.create_user(username='user',  email='user@email.com',  password='password') self.user  =  User.objects.create_user(username='user',  email='user@email.com',  password='password')
self.owner  =  User.objects.create_user(username='owner',  email='owner@email.com',  password='password') self.owner  =  User.objects.create_user(username='owner',  email='owner@email.com',  password='password')
self.editor  =  User.objects.create_user(username='editor',  email='editor@email.com',  password='password') self.editor  =  User.objects.create_user(username='editor',  email='editor@email.com',  password='password')
self.editor.groups.add(Group.objects.get(name='Editors')) self.editor.groups.add(Group.objects.get(name='Editors'))
  self.administrator  =  User.objects.create_superuser(username='administrator',  email='administrator@email.com',  password='password')
  self.administrator  =  User.objects.create_superuser(username='administrator',  email='administrator@email.com',  password='password')
  self.owner.user_permissions.add(Permission.objects.get(codename='add_image'))
  self.owner.user_permissions.add(Permission.objects.get(codename='add_document'))



Clone # 551
Distance between two fragments = 6
Clone size = 6
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 320
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 312
  def  get_latest_revision_as_page(self):
    try:
      revision  =  self.revisions.order_by('-created_at')[0]
    except  IndexError:
      return  self.specific

    return  revision.as_page_object()
  def  get_latest_revision(self):
    try:
      revision  =  self.revisions.order_by('-created_at')[0]
    except  IndexError:
      return  False

    return  revision



Clone # 552
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/autotag/match.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 29
import  datetime import  re
import  logging import  struct
import  re import  traceback
 
from  munkres  import  Munkres
 
from  beets  import  library
from  beets  import  plugins from  beets  import  plugins
from  beets  import  config from  beets  import  util



Clone # 553
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
import  logging import  logging
import  musicbrainzngs import  os
import  re import  re
import  traceback import  yaml
from  urlparse  import  urljoin
 
from  ..packages  import  six
import  beets.autotag.hooks import  sys
 



Clone # 554
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/library.py"
The first line is 19
import  logging import  sys
import  sqlite3 import  logging
import  errno import  shlex
import  re import  unicodedata
import  struct import  traceback
import  traceback
 
import  time



Clone # 555
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  json import  logging
import  re import  sqlite3
import  shlex import  errno
import  struct
 
import  re
import  requests import  struct
import  requests.exceptions import  traceback
 



Clone # 556
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  yaml import  json
import  logging import  re
import  time import  shlex
import  itertools import  struct
 
import  re
 
import  requests
import  beets import  requests.exceptions



Clone # 557
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/beets/util/confit.py"
The first line is 18
import  select import  platform
import  sys import  os
import  types import  pkgutil
import  errno import  sys
import  traceback import  yaml
import  time import  types



Clone # 558
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/confit.py"
The first line is 18
import  socket import  platform
import  select import  os
import  sys import  pkgutil
import  types import  sys
import  errno import  yaml
import  traceback import  types



Clone # 559
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 18
import  codecs import  platform
import  yaml import  os
import  logging import  pkgutil
import  time import  sys
import  itertools import  yaml
import  re
 
import  types



Clone # 560
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/beets/util/confit.py"
The first line is 18
import  ConfigParser import  platform
import  codecs import  os
import  yaml import  pkgutil
import  logging import  sys
import  time import  yaml
import  itertools import  types



Clone # 561
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 18
import  os import  platform
import  ConfigParser import  os
import  codecs import  pkgutil
import  yaml import  sys
import  logging import  yaml
import  time import  types



Clone # 562
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 18
import  re import  platform
import  sys import  os
import  logging import  pkgutil
import  shlex import  sys
import  unicodedata import  yaml
import  traceback import  types



Clone # 563
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 18
import  os import  platform
import  re import  os
import  sys import  pkgutil
import  logging import  sys
import  shlex import  yaml
import  unicodedata import  types



Clone # 564
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/beets/util/confit.py"
The first line is 18
import  tty import  platform
import  fcntl import  os
import  os import  pkgutil
import  termios import  sys
import  threading import  yaml
import  errno
 
import  types



Clone # 565
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  logging import  sys
import  os import  types
import  time import  errno
import  itertools import  traceback
import  codecs import  time
import  platform
 
import  collections
 
 



Clone # 566
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  socket import  sys
import  select import  types
import  sys import  errno
import  types import  traceback
import  errno import  time
import  traceback import  collections
 
 



Clone # 567
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  os import  sys
import  ConfigParser import  types
import  codecs import  errno
import  yaml import  traceback
import  logging import  time
import  time import  collections
 
 



Clone # 568
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  os import  sys
import  re import  types
import  sys import  errno
import  logging import  traceback
import  shlex import  time
import  unicodedata import  collections
 
 



Clone # 569
Distance between two fragments = 5
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  sys import  sys
import  tty import  types
import  fcntl import  errno
import  os import  traceback
import  termios import  time
import  threading import  collections
 
 



Clone # 570
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  logging import  fcntl
import  os import  os
import  time import  termios
import  itertools import  threading
import  codecs import  errno
 
import  platform
 
import  logging



Clone # 571
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  socket import  fcntl
import  select import  os
import  sys import  termios
import  types import  threading
import  errno import  errno
 
import  traceback import  logging



Clone # 572
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  os import  fcntl
import  ConfigParser import  os
import  codecs import  termios
import  yaml import  threading
import  logging import  errno
 
import  time import  logging



Clone # 573
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  os import  fcntl
import  re import  os
import  sys import  termios
import  logging import  threading
import  shlex import  errno
 
import  unicodedata import  logging



Clone # 574
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  sys import  fcntl
import  tty import  os
import  fcntl import  termios
import  os import  threading
import  termios import  errno
 
import  threading import  logging



Clone # 575
Distance between two fragments = 4
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  logging import  yaml
import  os import  logging
import  time import  time
import  itertools import  itertools
import  codecs import  re
 
import  platform
 
import  beets



Clone # 576
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 19
import  logging import  sys
import  os import  logging
import  time import  shlex
import  itertools import  unicodedata
import  codecs import  traceback
import  platform
 
import  time



Clone # 577
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  logging import  json
import  os import  re
import  time import  shlex
import  itertools import  struct
 
import  codecs import  requests
import  platform
 
import  requests.exceptions



Clone # 578
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  select import  logging
import  sys import  sqlite3
import  types import  errno
import  errno import  re
import  traceback import  struct
import  time import  traceback
 



Clone # 579
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  select import  json
import  sys import  re
import  types import  shlex
import  errno import  struct
 
import  traceback import  requests
import  time import  requests.exceptions



Clone # 580
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  socket import  logging
import  select import  sqlite3
import  sys import  errno
import  types import  re
import  errno import  struct
import  traceback import  traceback
 



Clone # 581
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  socket import  yaml
import  select import  logging
import  sys import  time
import  types import  itertools
import  errno import  re
 
import  traceback import  beets



Clone # 582
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/library.py"
The first line is 19
import  socket import  sys
import  select import  logging
import  sys import  shlex
import  types import  unicodedata
import  errno import  traceback
import  traceback import  time



Clone # 583
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  socket import  json
import  select import  re
import  sys import  shlex
import  types import  struct
 
import  errno import  requests
import  traceback import  requests.exceptions



Clone # 584
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  codecs import  logging
import  yaml import  sqlite3
import  logging import  errno
import  time import  re
import  itertools import  struct
import  re
 
import  traceback
 



Clone # 585
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  codecs import  json
import  yaml import  re
import  logging import  shlex
import  time import  struct
 
import  itertools import  requests
import  re
 
import  requests.exceptions



Clone # 586
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  ConfigParser import  logging
import  codecs import  sqlite3
import  yaml import  errno
import  logging import  re
import  time import  struct
import  itertools import  traceback
 



Clone # 587
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  ConfigParser import  json
import  codecs import  re
import  yaml import  shlex
import  logging import  struct
 
import  time import  requests
import  itertools import  requests.exceptions



Clone # 588
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  os import  logging
import  ConfigParser import  sqlite3
import  codecs import  errno
import  yaml import  re
import  logging import  struct
import  time import  traceback
 



Clone # 589
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  os import  yaml
import  ConfigParser import  logging
import  codecs import  time
import  yaml import  itertools
import  logging import  re
 
import  time import  beets



Clone # 590
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 19
import  os import  sys
import  ConfigParser import  logging
import  codecs import  shlex
import  yaml import  unicodedata
import  logging import  traceback
import  time import  time



Clone # 591
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  os import  json
import  ConfigParser import  re
import  codecs import  shlex
import  yaml import  struct
 
import  logging import  requests
import  time import  requests.exceptions



Clone # 592
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  re import  logging
import  sys import  sqlite3
import  logging import  errno
import  shlex import  re
import  unicodedata import  struct
import  traceback import  traceback
 



Clone # 593
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  re import  json
import  sys import  re
import  logging import  shlex
import  shlex import  struct
 
import  unicodedata import  requests
import  traceback import  requests.exceptions



Clone # 594
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  os import  logging
import  re import  sqlite3
import  sys import  errno
import  logging import  re
import  shlex import  struct
import  unicodedata import  traceback
 



Clone # 595
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  os import  yaml
import  re import  logging
import  sys import  time
import  logging import  itertools
import  shlex import  re
 
import  unicodedata import  beets



Clone # 596
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 19
import  os import  sys
import  re import  logging
import  sys import  shlex
import  logging import  unicodedata
import  shlex import  traceback
import  unicodedata import  time



Clone # 597
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  os import  json
import  re import  re
import  sys import  shlex
import  logging import  struct
 
import  shlex import  requests
import  unicodedata import  requests.exceptions



Clone # 598
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  tty import  logging
import  fcntl import  sqlite3
import  os import  errno
import  termios import  re
import  threading import  struct
import  errno
 
import  traceback
 



Clone # 599
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  tty import  json
import  fcntl import  re
import  os import  shlex
import  termios import  struct
 
import  threading import  requests
import  errno
 
import  requests.exceptions



Clone # 600
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  sys import  yaml
import  tty import  logging
import  fcntl import  time
import  os import  itertools
import  termios import  re
 
import  threading import  beets



Clone # 601
Distance between two fragments = 5
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 19
import  sys import  sys
import  tty import  logging
import  fcntl import  shlex
import  os import  unicodedata
import  termios import  traceback
import  threading import  time



Clone # 602
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  sys import  json
import  tty import  re
import  fcntl import  shlex
import  os import  struct
 
import  termios import  requests
import  threading import  requests.exceptions



Clone # 603
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  platform import  sys
import  os import  types
import  pkgutil import  errno
import  sys import  traceback
import  yaml import  time
import  types import  collections
 
 



Clone # 604
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  platform import  fcntl
import  os import  os
import  pkgutil import  termios
import  sys import  threading
import  yaml import  errno
 
import  types import  logging



Clone # 605
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  platform import  yaml
import  os import  logging
import  pkgutil import  time
import  sys import  itertools
import  yaml import  re
 
import  types import  beets



Clone # 606
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 19
import  platform import  sys
import  os import  logging
import  pkgutil import  shlex
import  sys import  unicodedata
import  yaml import  traceback
import  types import  time



Clone # 607
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  platform import  json
import  os import  re
import  pkgutil import  shlex
import  sys import  struct
 
import  yaml import  requests
import  types import  requests.exceptions



Clone # 608
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 10
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  sys import  logging
import  types import  sqlite3
import  errno import  errno
import  traceback import  re
import  time import  struct
import  collections
 
 
import  traceback
 



Clone # 609
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/bluelet.py"
The first line is 10
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  sys import  json
import  types import  re
import  errno import  shlex
import  traceback import  struct
 
import  time import  requests
import  collections
 
 
import  requests.exceptions



Clone # 610
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  fcntl import  logging
import  os import  sqlite3
import  termios import  errno
import  threading import  re
import  errno
 
import  struct
import  logging import  traceback
 



Clone # 611
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  fcntl import  json
import  os import  re
import  termios import  shlex
import  threading import  struct
 
import  errno
 
import  requests
import  logging import  requests.exceptions



Clone # 612
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  os import  socket
import  time import  select
import  itertools import  sys
import  codecs import  types
import  platform
 
import  errno
import  beets import  traceback



Clone # 613
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/util/confit.py"
The first line is 18
import  os import  platform
import  time import  os
import  itertools import  pkgutil
import  codecs import  sys
import  platform
 
import  yaml
import  beets import  types



Clone # 614
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  os import  logging
import  time import  sqlite3
import  itertools import  errno
import  codecs import  re
import  platform
 
import  struct
import  beets import  traceback
 



Clone # 615
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  os import  logging
import  time import  os
import  itertools import  time
import  codecs import  itertools
import  platform
 
import  codecs
import  beets import  platform
 



Clone # 616
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  os import  os
import  time import  ConfigParser
import  itertools import  codecs
import  codecs import  yaml
import  platform
 
import  logging
import  beets import  time



Clone # 617
Distance between two fragments = 5
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 17
import  os import  os
import  time import  re
import  itertools import  sys
import  codecs import  logging
import  platform
 
import  shlex
import  beets import  unicodedata



Clone # 618
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  os import  sys
import  time import  tty
import  itertools import  fcntl
import  codecs import  os
import  platform
 
import  termios
import  beets import  threading



Clone # 619
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  os import  json
import  time import  re
import  itertools import  shlex
import  codecs import  struct
 
import  platform
 
import  requests
import  beets import  requests.exceptions



Clone # 620
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  os import  sqlite3
import  sys import  errno
import  re import  re
import  shutil import  struct
import  fnmatch import  traceback
 
from  collections  import  defaultdict from  beets  import  library



Clone # 621
Distance between two fragments = 6
Clone size = 6
Source file "../tests/fig/fig/packages/six.py"
The first line is 282
Source file "../tests/fig/fig/packages/six.py"
The first line is 278
def  itervalues(d,  **kw):
    """Return  an  iterator  over  the  values  of  a  dictionary."""
    return  iter(getattr(d,  _itervalues)(**kw))
 
def  iterkeys(d,  **kw):
    """Return  an  iterator  over  the  keys  of  a  dictionary."""
    return  iter(getattr(d,  _iterkeys)(**kw))
 
def  iteritems(d,  **kw):
    """Return  an  iterator  over  the  (key,  value)  pairs  of  a  dictionary."""
    return  iter(getattr(d,  _iteritems)(**kw))
 
def  itervalues(d,  **kw):
    """Return  an  iterator  over  the  values  of  a  dictionary."""
    return  iter(getattr(d,  _itervalues)(**kw))
 
def  iterlists(d,  **kw):
    """Return  an  iterator  over  the  (key,  [values])  pairs  of  a  dictionary."""
    return  iter(getattr(d,  _iterlists)(**kw))
 
 
def  iteritems(d,  **kw):
    """Return  an  iterator  over  the  (key,  value)  pairs  of  a  dictionary."""
    return  iter(getattr(d,  _iteritems)(**kw))
 



Clone # 622
Distance between two fragments = 1
Clone size = 6
Source file "../tests/beets/ui/migrate.py"
The first line is 281
Source file "../tests/beets/ui/migrate.py"
The first line is 332
  if  os.path.exists(destfn):
    if  replace:
      log.debug(u'moving  old  config  aside:  {0}'.format(
        util.displayable_path(destfn)
      ))
      _displace(destfn)
    else:
      #  File  exists  and  we  won't  replace  it.  We're  done.
     
return
  if  os.path.exists(destfn):
    if  replace:
      log.debug(u'moving  old  database  aside:  {0}'.format(
        util.displayable_path(destfn)
      ))
      _displace(destfn)
    else:
      return



Clone # 623
Distance between two fragments = 6
Clone size = 6
Source file "../tests/beets/mediafile.py"
The first line is 1301
Source file "../tests/beets/mediafile.py"
The first line is 1250
encoder  =  MediaField(
  MP3StorageStyle('TENC'),
  MP4StorageStyle("\xa9too"),
  StorageStyle('ENCODEDBY
'),
  StorageStyle('ENCODER'),
  ASFStorageStyle('WM/EncodedBy'),
)
albumartist  =  MediaField(
  MP3StorageStyle('TPE2'),
  MP4StorageStyle('aART'),
  StorageStyle('ALBUM  ARTIST'),
  StorageStyle('ALBUMARTIST
'),
  ASFStorageStyle('WM/AlbumArtist'),
)



Clone # 624
Distance between two fragments = 0
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 617
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 643
if  not  self._auth_configs:
  self._auth_configs  =  auth.load_config()
if  not  self._auth_configs:
  self._auth_configs  =  auth.load_config()
  authcfg  =  auth.resolve_authconfig(self._auth_configs,  registry)
  authcfg  =  auth.resolve_authconfig(self._auth_configs,  registry)
  if  authcfg:
    headers['X-Registry-Auth']  =  auth.encode_header(authcfg)
  if  authcfg:
    headers['X-Registry-Auth']  =  auth.encode_header(authcfg)



Clone # 625
Distance between two fragments = 3
Clone size = 6
Source file "../tests/fig/fig/packages/docker/unixconn/unixconn.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/unixconn/unixconn.py"
The first line is 52
  def  __init__(self,  base_url,  unix_socket,  timeout=60):
    httplib.HTTPConnection.__init__(self,  'localhost',  timeout=timeout)
    self.base_url  =  base_url
    self.unix_socket  =  unix_socket
    self.timeout  =  timeout
  def  __init__(self,  base_url,  socket_path,  timeout=60):
    connectionpool.HTTPConnectionPool.__init__(self,  'localhost',
   
  timeout=timeout)
    self.base_url  =  base_url
    self.socket_path  =  socket_path
    self.timeout  =  timeout



Clone # 626
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 27
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 21
  self.assertEqual(Site.find_for_request(request),  events_site)
  self.assertEqual(Site.find_for_request(request),  default_site)
request  =  HttpRequest() request  =  HttpRequest()
request.path  =  '/' request.path  =  '/'
request.META['HTTP_HOST']  =  'unknown.example.com' request.META['HTTP_HOST']  =  'events.example.com'
  self.assertEqual(Site.find_for_request(request),  default_site)
  self.assertEqual(Site.find_for_request(request),  events_site)



Clone # 627
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 127
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 77
  for  i  in  range(2):
    models.Query.get("old  popular  query").add_hit()
  for  i  in  range(5):
    models.Query.get("little  popular  query").add_hit()
self.assertEqual(past_week_popular_queries.count(),  2) self.assertEqual(popular_queries.count(),  3)
self.assertEqual(past_week_popular_queries[0],  models.Query.get("new  popular  query")) self.assertEqual(popular_queries[0],  models.Query.get("popular  query"))
  self.assertEqual(past_week_popular_queries[1],  models.Query.get("old  popular  query"))

self.assertEqual(popular_queries[1],  models.Query.get("little  popular  query"))



Clone # 628
Distance between two fragments = 2
Clone size = 5
Source file "../tests/fig/tests/service_test.py"
The first line is 125
Source file "../tests/fig/tests/service_test.py"
The first line is 143
self.assertEqual(old_container.dictionary['Config']['Entrypoint'],  ['ps']) self.assertEqual(new_container.dictionary['Config']['Entrypoint'],  ['ps'])
self.assertEqual(old_container.dictionary['Config']['Cmd'],  ['ax']) self.assertEqual(new_container.dictionary['Config']['Cmd'],  ['ax'])
self.assertIn('FOO=1',  old_container.dictionary['Config']['Env']) self.assertIn('FOO=2',  new_container.dictionary['Config']['Env'])
self.assertEqual(old_container.name,  'figtest_db_1') self.assertEqual(new_container.name,  'figtest_db_1')
service.start_container(old_container) service.start_container(new_container)



Clone # 629
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/tests/service_test.py"
The first line is 15
Source file "../tests/fig/tests/service_test.py"
The first line is 10
self.assertRaises(ConfigError,  lambda:  Service(name='\xe2'))   self.assertRaises(ConfigError,  lambda:  Service(name=''))
self.assertRaises(ConfigError,  lambda:  Service(name='_')) self.assertRaises(ConfigError,  lambda:  Service(name='  '))
self.assertRaises(ConfigError,  lambda:  Service(name='____')) self.assertRaises(ConfigError,  lambda:  Service(name='/'))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar')) self.assertRaises(ConfigError,  lambda:  Service(name='!'))
  self.assertRaises(ConfigError,  lambda:  Service(name='__foo_bar__'))
self.assertRaises(ConfigError,  lambda:  Service(name='\xe2'))



Clone # 630
Distance between two fragments = 0
Clone size = 5
Source file "../tests/fig/tests/project_test.py"
The first line is 49
Source file "../tests/fig/tests/project_test.py"
The first line is 18
self.assertEqual(len(project.services),  2) self.assertEqual(len(project.services),  2)
self.assertEqual(project.get_service('web').name,  'web') self.assertEqual(project.get_service('web').name,  'web')
self.assertEqual(project.get_service('web').options['image'],  'ubuntu') self.assertEqual(project.get_service('web').options['image'],  'ubuntu')
self.assertEqual(project.get_service('db').name,  'db') self.assertEqual(project.get_service('db').name,  'db')
  self.assertEqual(project.get_service('db').options['image'],  'ubuntu')
  self.assertEqual(project.get_service('db').options['image'],  'ubuntu')



Clone # 631
Distance between two fragments = 1
Clone size = 5
Source file "../tests/fig/tests/service_test.py"
The first line is 76
Source file "../tests/fig/tests/service_test.py"
The first line is 72
self.assertEqual(len(service.containers()),  0) self.assertEqual(len(service.containers()),  1)
  self.assertEqual(len(service.containers(stopped=True)),  1)
  self.assertEqual(len(service.containers(stopped=True)),  1)
service.stop(timeout=1) service.stop(timeout=1)
self.assertEqual(len(service.containers()),  0) self.assertEqual(len(service.containers()),  0)
  self.assertEqual(len(service.containers(stopped=True)),  1)
  self.assertEqual(len(service.containers(stopped=True)),  1)



Clone # 632
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/tests/cli_test.py"
The first line is 79
Source file "../tests/fig/tests/cli_test.py"
The first line is 71
self.assertEqual(len(project.get_service('simple').containers()),  1) self.assertEqual(len(project.get_service('simple').containers()),  3)
  self.assertEqual(len(project.get_service('another').containers()),  1)
  self.assertEqual(len(project.get_service('another').containers()),  2)
self.command.scale({'SERVICE=NUM':  ['simple=0',  'another=0']}) self.command.scale({'SERVICE=NUM':  ['simple=1',  'another=1']})
self.assertEqual(len(project.get_service('simple').containers()),  0) self.assertEqual(len(project.get_service('simple').containers()),  1)
self.assertEqual(len(project.get_service('another').containers()),  0)   self.assertEqual(len(project.get_service('another').containers()),  1)



Clone # 633
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 308
super(MP_MoveHandler,  self).__init__() super(MP_AddChildHandler,  self).__init__()
self.node  =  node self.node  =  node
self.node_cls  =  node.__class__ self.node_cls  =  node.__class__
self.target  =  target self.instance  =  instance
  self.pos  =  pos
  self.kwargs  =  kwargs



Clone # 634
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 412
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 359
super(MP_MoveHandler,  self).__init__() super(MP_AddSiblingHandler,  self).__init__()
self.node  =  node self.node  =  node
self.node_cls  =  node.__class__ self.node_cls  =  node.__class__
self.target  =  target self.pos  =  pos
  self.pos  =  pos
self.instance  =  instance



Clone # 635
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 308
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 359
super(MP_AddChildHandler,  self).__init__() super(MP_AddSiblingHandler,  self).__init__()
self.node  =  node self.node  =  node
self.node_cls  =  node.__class__ self.node_cls  =  node.__class__
self.instance  =  instance self.pos  =  pos
  self.kwargs  =  kwargs
self.instance  =  instance



Clone # 636
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 139
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 28
date_to  =  models.DateField(
  "End  date",
  null=True,
  blank=True,
  help_text="Not  required  if  event  is  on  a  single  day"
)
link_page  =  models.ForeignKey(
  'wagtailcore.Page',
  null=True,
  blank=True,
  related_name='+'
)



Clone # 637
Distance between two fragments = 2
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 555
Source file "../tests/beets/mediafile.py"
The first line is 538
  def  fetch(self,  mutagen_file):
    try:
      return  mutagen_file[self.key].data
    except  KeyError:
      return  None
  def  fetch(self,  mutagen_file):
    try:
      return  mutagen_file[self.key].text
    except  KeyError:
      return  []



Clone # 638
Distance between two fragments = 2
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 483
Source file "../tests/beets/mediafile.py"
The first line is 391
  def  get(self,  mutagen_file):
    try:
      return  mutagen_file[self.key]
    except  KeyError:
      return  None
  def  fetch(self,  mutagen_file):
    try:
      return  mutagen_file[self.key]
    except  KeyError:
      return  []



Clone # 639
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 139
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 34
date_to  =  models.DateField(
  "End  date",
  null=True,
  blank=True,
  help_text="Not  required  if  event  is  on  a  single  day"
)
  link_document  =  models.ForeignKey(
    'wagtaildocs.Document',
    null=True,
    blank=True,
    related_name='+'
  )



Clone # 640
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 28
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 34
link_page  =  models.ForeignKey(
  'wagtailcore.Page',
  null=True,
  blank=True,
  related_name='+'
)
  link_document  =  models.ForeignKey(
    'wagtaildocs.Document',
    null=True,
    blank=True,
    related_name='+'
  )



Clone # 641
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1397
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 642
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1403
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 643
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1409
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
 
  StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)



Clone # 644
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1415
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('
ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBR
AINZ_RELEASEGROUPID'),
    AS
FStorageStyle('MusicBrainz/Release  Group  Id'),
  )



Clone # 645
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1423
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
 
  StorageStyle('ACOUSTID_ID'),
 
  ASFStorageStyle('Acoustid/Id'),
  )
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)



Clone # 646
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1308
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 647
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1320
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('M
USICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECO
UNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 648
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1327
  mb_releasegroupid  =  MediaField(
 
  MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
 
  StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
 
  ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 649
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1339
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('A
COUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).

    MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUS
ICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 650
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1320
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('M
USICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECO
UNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 651
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1327
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 652
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1339
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACO
USTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented 
for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('M
USICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 653
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1277
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 654
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1283
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 655
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1289
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 656
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1277
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 657
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1283
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 658
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1289
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 659
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1283
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country
"),
  StorageStyle('RELEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 660
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1327
Source file "../tests/beets/mediafile.py"
The first line is 1289
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 661
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1333
Source file "../tests/beets/mediafile.py"
The first line is 1295
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 662
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1320
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('M
USICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECO
UNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 663
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1327
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 664
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1339
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
  albumdisambig  =  MediaField(
    #  This  tag  ma
pping  was  invented  for  beets  (not  used  by  Picard,  etc).
    MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 665
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1327
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "
Release  Country"),
  StorageStyle('RE
LEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICB
RAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 666
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1409
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)



Clone # 667
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1415
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
 
  StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )



Clone # 668
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1423
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('M
USICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz
/Album  Artist  Id'),
)
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACO
USTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)



Clone # 669
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1429
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 670
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1403
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIP
T'),
  ASFStorageStyle('WM/Script'),
)
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSI
CBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 671
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1415
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('
RELEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBR
AINZ_RELEASEGROUPID'),
 
  ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )



Clone # 672
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1327
Source file "../tests/beets/mediafile.py"
The first line is 1423
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('M
USICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz
/Album  Status'),
)
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACO
USTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)



Clone # 673
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1271
Source file "../tests/beets/mediafile.py"
The first line is 1314
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)



Clone # 674
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1320
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('A
LBUMARTISTSORT'),
  ASFStorageStyle('WM
/AlbumArtistSortOrder'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RE
LEASECOUNTRY'),
  ASFStorageStyle('Music
Brainz/Album  Release  Country'),
)



Clone # 675
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1327
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.i
Tunes:ASIN"),
  StorageStyle('ASIN
'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRA
INZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 676
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1409
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT
'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_
ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)



Clone # 677
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1415
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('
ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBR
AINZ_RELEASEGROUPID'),
 
  ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )



Clone # 678
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1423
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CA
TALOGNUMBER'),
  ASFStorageStyle('WM
/CatalogNo'),
)
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('A
COUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)



Clone # 679
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1397
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
 
  StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 680
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1403
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  AS
FStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 681
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1409
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('A
COUSTID_ID'),
 
  ASFStorageStyle('Acoustid/Id'),
  )
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSI
CBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)



Clone # 682
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1308
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 683
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1320
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('A
COUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASE
COUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 684
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1327
  acoustid_id  =  MediaField(
 
  MP3DescStorageStyle(u'Acoustid  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('A
COUSTID_ID'),
 
  ASFStorageStyle('Acoustid/Id'),
  )
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUS
ICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 685
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1277
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 686
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1283
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 687
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1289
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 688
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1397
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN
'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRA
INZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 689
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1403
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CA
TALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSI
CBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 690
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1308
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 691
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1320
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM
/CatalogNo'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECOUN
TRY'),
  ASFStorageStyle('Music
Brainz/Album  Release  Country'),
)



Clone # 692
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1277
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 693
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1283
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 694
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1327
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 695
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1339
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
 
  StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 696
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1320
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT
'),
  ASFStorageStyle('WM/Script'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECOUN
TRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 697
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1327
Source file "../tests/beets/mediafile.py"
The first line is 1339
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 698
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1327
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 699
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1339
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMEN
T'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 700
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1397
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  AS
FStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 701
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1403
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('A
COUSTID_ID'),
 
  ASFStorageStyle('Acoustid/Id'),
  )
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSI
CBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 702
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1308
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 703
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1320
  acoustid_id  =  MediaField(
 
  MP3DescStorageStyle(u'Acoustid  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('A
COUSTID_ID'),
 
  ASFStorageStyle('Acoustid/Id'),
  )
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASE
COUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 704
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1277
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 705
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1283
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 706
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1397
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER
'),
  ASFStorageStyle('WM/CatalogNo'),
)
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSI
CBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 707
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1308
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 708
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1277
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 709
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1295
Source file "../tests/beets/mediafile.py"
The first line is 1163
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 710
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1339
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
 
  StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 711
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1327
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIP
T'),
  ASFStorageStyle('WM/Script'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSI
CBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 712
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1314
Source file "../tests/beets/mediafile.py"
The first line is 1333
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)



Clone # 713
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1339
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "
Release  Country"),
  StorageStyle('R
ELEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICB
RAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 714
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1339
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASI
N'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRA
INZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 715
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1333
Source file "../tests/beets/mediafile.py"
The first line is 1163
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 716
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1314
Source file "../tests/beets/mediafile.py"
The first line is 1151
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)



Clone # 717
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1314
Source file "../tests/beets/mediafile.py"
The first line is 1157
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 718
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1271
Source file "../tests/beets/mediafile.py"
The first line is 1151
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)



Clone # 719
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1333
Source file "../tests/beets/mediafile.py"
The first line is 1157
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 720
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1333
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)



Clone # 721
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1333
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)



Clone # 722
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1314
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)



Clone # 723
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1314
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)



Clone # 724
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1271
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)



Clone # 725
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1151
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)



Clone # 726
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1157
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 727
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1157
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 728
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1163
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 729
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1295
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 730
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1339
Source file "../tests/beets/mediafile.py"
The first line is 1397
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
 
  StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 731
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1333
Source file "../tests/beets/mediafile.py"
The first line is 1271
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)



Clone # 732
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1339
Source file "../tests/beets/mediafile.py"
The first line is 1277
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 733
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1333
Source file "../tests/beets/mediafile.py"
The first line is 1151
media  =  MediaField(
  MP3StorageStyle('TMED'),
  MP4StorageStyle("----:com.apple.iTunes:MEDIA"),
  StorageStyle('MEDIA'),
  ASFStorageStyle('WM/Media'),
)
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)



Clone # 734
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1339
Source file "../tests/beets/mediafile.py"
The first line is 1377
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).

    MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
    MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMARTIST_CREDIT'),
    ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 735
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1429
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 736
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1423
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM
/Script'),
)
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('A
COUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)



Clone # 737
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1429
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 738
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1314
Source file "../tests/beets/mediafile.py"
The first line is 1163
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 739
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1271
Source file "../tests/beets/mediafile.py"
The first line is 1157
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 740
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1151
Source file "../tests/beets/mediafile.py"
The first line is 1157
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)



Clone # 741
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1157
Source file "../tests/beets/mediafile.py"
The first line is 1163
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 742
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1371
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 743
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1377
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMARTIST_CREDIT'),
    AS
FStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 744
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1371
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 745
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1415
Source file "../tests/beets/mediafile.py"
The first line is 1377
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
    MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
    StorageStyle('MUSICBRAINZ
_RELEASEGROUPID'),
    ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
    MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('AL
BUMARTIST_CREDIT'),
    ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 746
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1371
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 747
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1409
Source file "../tests/beets/mediafile.py"
The first line is 1377
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_
ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('
ALBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 748
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1371
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 749
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1403
Source file "../tests/beets/mediafile.py"
The first line is 1377
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUS
ICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('AL
BUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 750
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1397
Source file "../tests/beets/mediafile.py"
The first line is 1377
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_
ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('
ALBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 751
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1327
Source file "../tests/beets/mediafile.py"
The first line is 1371
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 752
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1371
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release
  Country"),
  StorageStyle('RELEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 753
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1327
Source file "../tests/beets/mediafile.py"
The first line is 1377
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 754
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1320
Source file "../tests/beets/mediafile.py"
The first line is 1377
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "
Release  Country"),
  StorageStyle('
RELEASECOUNTRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('AL
BUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 755
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1371
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 756
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1371
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 757
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1289
Source file "../tests/beets/mediafile.py"
The first line is 1377
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('
ALBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 758
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1371
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 759
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1283
Source file "../tests/beets/mediafile.py"
The first line is 1377
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('AS
IN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMART
IST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 760
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1277
Source file "../tests/beets/mediafile.py"
The first line is 1377
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMART
ISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
    MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('A
LBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 761
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1289
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 762
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1314
Source file "../tests/beets/mediafile.py"
The first line is 1295
language  =  MediaField(
  MP3StorageStyle('TLAN'),
  MP4StorageStyle("----:com.apple.iTunes:LANGUAGE"),
  StorageStyle('LANGUAGE'),
  ASFStorageStyle('WM/Language'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 763
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1157
Source file "../tests/beets/mediafile.py"
The first line is 1295
artist  =  MediaField(
  MP3StorageStyle('TPE1'),
  MP4StorageStyle("\xa9ART"),
  StorageStyle('ARTIST'),
  ASFStorageStyle('Author'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 764
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1423
Source file "../tests/beets/mediafile.py"
The first line is 1371
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUSTID_FINGERPRINT'),
  ASFStorageStyle('Acoustid/Fingerprint'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 765
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1429
Source file "../tests/beets/mediafile.py"
The first line is 1377
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUST
ID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
    MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMART
IST_CREDIT'),
    ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 766
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1371
Source file "../tests/beets/mediafile.py"
The first line is 1289
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 767
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1271
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)



Clone # 768
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1177
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)



Clone # 769
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1183
Source file "../tests/beets/mediafile.py"
The first line is 1151
grouping  =  MediaField(
  MP3StorageStyle('TIT1'),
  MP4StorageStyle("\xa9grp"),
  StorageStyle('GROUPING'),
  ASFStorageStyle('WM/ContentGroupDescription'),
)
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)



Clone # 770
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1339
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
  albumdisambig  =  MediaField(
    #  This  tag  ma
pping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
 
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
 
  StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
 
  ASFStorageStyle('MusicBrainz/Album  Comment'),
  )



Clone # 771
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1423
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUS
ICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz
/Album  Type'),
)
acoustid_fingerprint  =  MediaField(
  MP3DescStorageStyle(u'Acoustid  Fingerprint'),
  MP4StorageStyle('----:com.apple.iTunes:Acoustid  Fingerprint'),
  StorageStyle('ACOUS
TID_FINGERPRINT'),
  ASFStorageStyle('Acoustid
/Fingerprint'),
)



Clone # 772
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1415
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
  mb_releasegroupid  =  MediaField(
    MP3DescStorageStyle(u'MusicBrainz  Release  Group  Id'),
 
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Release  Group  Id'),
 
  StorageStyle('MUSICBRAINZ_RELEASEGROUPID'),
 
  ASFStorageStyle('MusicBrainz/Release  Group  Id'),
  )



Clone # 773
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1409
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
mb_albumartistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMARTISTID'),
  ASFStorageStyle('MusicBrainz/Album  Artist  Id'),
)



Clone # 774
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1403
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
mb_artistid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Artist  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Artist  Id'),
  StorageStyle('MUSICBRAINZ_ARTISTID'),
  ASFStorageStyle('MusicBrainz/Artist  Id'),
)



Clone # 775
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1397
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
mb_albumid  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Id'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Id'),
  StorageStyle('MUSICBRAINZ_ALBUMID'),
  ASFStorageStyle('MusicBrainz/Album  Id'),
)



Clone # 776
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1371
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 777
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1327
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
albumstatus  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Status'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Status"),
  StorageStyle('MUSICBRAINZ_ALBUMSTATUS'),
  ASFStorageStyle('MusicBrainz/Album  Status'),
)



Clone # 778
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1320
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMT
YPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
country  =  MediaField(
  MP3DescStorageStyle('MusicBrainz  Album  Release  Country'),
  MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  "
    "Release  Country"),
  StorageStyle('RELEASECOUN
TRY'),
  ASFStorageStyle('MusicBrainz/Album  Release  Country'),
)



Clone # 779
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1289
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
catalognum  =  MediaField(
  MP3DescStorageStyle(u'CATALOGNUMBER'),
  MP4StorageStyle("----:com.apple.iTunes:CATALOGNUMBER"),
  StorageStyle('CATALOGNUMBER'),
  ASFStorageStyle('WM/CatalogNo'),
)



Clone # 780
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1283
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
asin  =  MediaField(
  MP3DescStorageStyle(u'ASIN'),
  MP4StorageStyle("----:com.apple.iTunes:ASIN"),
  StorageStyle('ASIN'),
  ASFStorageStyle('MusicBrainz/ASIN'),
)



Clone # 781
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1277
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
albumartist_sort  =  MediaField(
  MP3DescStorageStyle(u'ALBUMARTISTSORT'),
  MP4StorageStyle("soaa"),
  StorageStyle('ALBUMARTISTSORT'),
  ASFStorageStyle('WM/AlbumArtistSortOrder'),
)



Clone # 782
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1429
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 783
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1257
Source file "../tests/beets/mediafile.py"
The first line is 1377
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSICBRAINZ_
ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('
ALBUMARTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 784
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1339
Source file "../tests/beets/mediafile.py"
The first line is 1371
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)



Clone # 785
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1339
Source file "../tests/beets/mediafile.py"
The first line is 1308
  albumdisambig  =  MediaField(
    #  This  tag  mapping  was  invented  for  beets  (not  used  by  Picard,  etc).
 
  MP3DescStorageStyle(u'MusicBrainz  Album  Comment'),
    MP4StorageStyle("----:com.apple.iTunes:MusicBrainz  Album  Comment"),
    StorageStyle('MUSICBRAINZ_ALBUMCOMMENT'),
    ASFStorageStyle('MusicBrainz/Album  Comment'),
  )
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)



Clone # 786
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1371
Source file "../tests/beets/mediafile.py"
The first line is 1429
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 787
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1429
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT'),
  ASFStorageStyle('WM/Script'),
)
  acoustid_id  =  MediaField(
    MP3DescStorageStyle(u'Acoustid  Id'),
    MP4StorageStyle('----:com.apple.iTunes:Acoustid  Id'),
    StorageStyle('ACOUSTID_ID'),
    ASFStorageStyle('Acoustid/Id'),
  )



Clone # 788
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1271
Source file "../tests/beets/mediafile.py"
The first line is 1163
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 789
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1163
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 790
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1151
Source file "../tests/beets/mediafile.py"
The first line is 1163
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)
album  =  MediaField(
  MP3StorageStyle('TALB'),
  MP4StorageStyle("\xa9alb"),
  StorageStyle('ALBUM'),
  ASFStorageStyle('WM/AlbumTitle'),
)



Clone # 791
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1371
Source file "../tests/beets/mediafile.py"
The first line is 1377
artist_credit  =  MediaField(
  MP3DescStorageStyle(u'Artist  Credit'),
  MP4StorageStyle("----:com.apple.iTunes:Artist  Credit"),
  StorageStyle('ARTIST_CREDIT'),
  ASFStorageStyle('beets/Artist  Credit'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMARTIST_CREDIT'),
    ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 792
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1377
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('S
CRIPT'),
  ASFStorageStyle('WM/Script'),
)
  albumartist_credit  =  MediaField(
    MP3DescStorageStyle(u'Album  Artist  Credit'),
 
  MP4StorageStyle("----:com.apple.iTunes:Album  Artist  Credit"),
    StorageStyle('ALBUMA
RTIST_CREDIT'),
 
  ASFStorageStyle('beets/Album  Artist  Credit'),
  )



Clone # 793
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1271
Source file "../tests/beets/mediafile.py"
The first line is 1295
artist_sort  =  MediaField(
  MP3StorageStyle('TSOP'),
  MP4StorageStyle("soar"),
  StorageStyle('ARTISTSORT'),
  ASFStorageStyle('WM/ArtistSortOrder'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 794
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1177
Source file "../tests/beets/mediafile.py"
The first line is 1295
composer  =  MediaField(
  MP3StorageStyle('TCOM'),
  MP4StorageStyle("\xa9wrt"),
  StorageStyle('COMPOSER'),
  ASFStorageStyle('WM/Composer'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 795
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1151
Source file "../tests/beets/mediafile.py"
The first line is 1295
title  =  MediaField(
  MP3StorageStyle('TIT2'),
  MP4StorageStyle("\xa9nam"),
  StorageStyle('TITLE'),
  ASFStorageStyle('Title'),
)
disctitle  =  MediaField(
  MP3StorageStyle('TSST'),
  MP4StorageStyle("----:com.apple.iTunes:DISCSUBTITLE"),
  StorageStyle('DISCSUBTITLE'),
  ASFStorageStyle('WM/SetSubTitle'),
)



Clone # 796
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/importer.py"
The first line is 27
Source file "../tests/beets/importer.py"
The first line is 26
from  beets  import  library from  beets  import  autotag
from  beets  import  dbcore from  beets  import  library
from  beets  import  plugins from  beets  import  dbcore
from  beets  import  util from  beets  import  plugins
from  beets  import  config from  beets  import  util



Clone # 797
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 5
from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailimages.models  import  get_image_model from  wagtail.wagtailimages.models  import  get_image_model
from  wagtail.wagtailimages.forms  import  get_image_form,  ImageInsertionForm from  wagtail.wagtailimages.forms  import  get_image_form
 
 



Clone # 798
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 33
Source file "../tests/beets/library.py"
The first line is 27
from  beets  import  library from  beets  import  plugins
from  beets  import  plugins from  beets  import  util
from  beets  import  util from  beets.util  import  bytestring_path,  syspath,  normpath,  samefile
from  beets.util.functemplate  import  Template from  beets.util.functemplate  import  Template
from  beets  import  config from  beets  import  dbcore



Clone # 799
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 3
from  django.shortcuts  import  get_object_or_404,  render from  django.http  import  Http404
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.utils.http  import  urlencode
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm,  ExternalLinkChooserForm,  ExternalLinkChooserWithLinkTextForm,  EmailLinkChooserForm,  EmailLinkChooserWithLinkTextForm
 



Clone # 800
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 3
from  django.shortcuts  import  get_object_or_404,  render from  django.http  import  Http404
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.utils.http  import  urlencode
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm,  ExternalLinkChooserForm,  ExternalLinkChooserWithLinkTextForm,  EmailLinkChooserForm,  EmailLinkChooserWithLinkTextForm
 



Clone # 801
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 3
from  django.shortcuts  import  render from  django.http  import  Http404
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.utils.http  import  urlencode
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm,  ExternalLinkChooserForm,  ExternalLinkChooserWithLinkTextForm,  EmailLinkChooserForm,  EmailLinkChooserWithLinkTextForm
 



Clone # 802
Distance between two fragments = 4
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 10
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 3
from  django.db  import  connection,  models,  transaction from  django.core  import  serializers
from  django.db.models  import  Q from  django.db  import  connection,  models,  transaction
from  django.utils.translation  import  ugettext_noop  as  _
 
from  django.utils.translation  import  ugettext_noop  as  _
 
from  treebeard.exceptions  import  InvalidMoveToDescendant from  treebeard.exceptions  import  InvalidMoveToDescendant
from  treebeard.models  import  Node
 
 
from  treebeard.models  import  Node
 
 



Clone # 803
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 1
from  django.test  import  TestCase from  django.test  import  TestCase
from  django.test.client  import  Client from  django.core  import  management
from  wagtail.wagtailredirects  import  models from  wagtail.wagtailsearch  import  models
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
from  django.core.urlresolvers  import  reverse
 
 
from  StringIO  import  StringIO



Clone # 804
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailadmin/views/account.py"
The first line is 2
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib.auth.forms  import  SetPasswordForm
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.exceptions  import  PermissionDenied from  django.utils.translation  import  ugettext  as  _
 



Clone # 805
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailadmin/views/account.py"
The first line is 2
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib.auth.forms  import  SetPasswordForm
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.exceptions  import  PermissionDenied from  django.utils.translation  import  ugettext  as  _
 



Clone # 806
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailadmin/views/account.py"
The first line is 2
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.forms  import  SetPasswordForm
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib.auth.decorators  import  permission_required
from  django.utils.translation  import  ugettext    as  _
 
from  django.utils.translation  import  ugettext  as  _
 



Clone # 807
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailcore/rich_text.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailadmin/views/home.py"
The first line is 5
from  django.utils.html  import  escape
 
from  django.template.loader  import  render_to_string
 
from  wagtail.wagtailcore.whitelist  import  Whitelister from  wagtail.wagtailadmin  import  hooks
 
from  wagtail.wagtailcore.models  import  Page
 
from  wagtail.wagtailcore.models  import  Page,  PageRevision,  UserPagePermissionsProxy
 
from  wagtail.wagtaildocs.models  import  Document
 
from  wagtail.wagtaildocs.models  import  Document
 
from  wagtail.wagtailimages.models  import  get_image_model from  wagtail.wagtailimages.models  import  get_image_model
 
 



Clone # 808
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 809
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 810
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 811
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 812
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 813
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  DataMigration
from  django.db  import  models,  connection from  django.db  import  models,  connection
from  django.db.transaction  import  set_autocommit
 
from  django.db.transaction  import  set_autocommit
 



Clone # 814
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  errno import  datetime
import  logging import  os
import  os import  socket
import  re import  subprocess
import  yaml import  platform



Clone # 815
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/docopt_command.py"
The first line is 1
Source file "../tests/fig/fig/cli/log_printer.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
import  sys
 
import  sys
 
from  inspect  import  getdoc from  itertools  import  cycle
 
from  docopt  import  docopt,  DocoptExit
 
 
from  .multiplexer  import  Multiplexer



Clone # 816
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  sys import  logging
import  re import  os
import  shutil import  re
import  fnmatch import  yaml



Clone # 817
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  logging import  os
import  sqlite3 import  sys
import  errno import  re
import  re import  shutil
import  struct import  fnmatch



Clone # 818
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  logging import  datetime
import  sqlite3 import  os
import  errno import  socket
import  re import  subprocess
import  struct import  platform



Clone # 819
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  logging import  errno
import  os import  logging
import  time import  os
import  itertools import  re
import  codecs import  yaml



Clone # 820
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  sys import  errno
import  tty import  logging
import  fcntl import  os
import  os import  re
import  termios import  yaml



Clone # 821
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  division
 
from  __future__  import  print_function
 
import  os import  re
import  sys import  ast
import  re import  dis
import  shutil import  types
 



Clone # 822
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  platform import  re
import  os import  ast
import  pkgutil import  dis
import  sys import  types
 



Clone # 823
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  logging import  re
import  os import  ast
import  time import  dis
import  itertools import  types
 



Clone # 824
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  division from  __future__  import  print_function
 
import  datetime import  re
import  os import  ast
import  socket import  dis
import  subprocess import  types
 



Clone # 825
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  print_function from  __future__  import  print_function
 
import  sys import  re
import  tty import  ast
import  fcntl import  dis
import  os import  types
 



Clone # 826
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  division
 
from  __future__  import  print_function
 
import  os import  locale
import  sys import  optparse
import  re import  textwrap
import  shutil import  sys



Clone # 827
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  division
 
from  __future__  import  print_function
 
import  os import  os
import  sys import  logging
import  re import  pickle
import  shutil import  itertools



Clone # 828
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  platform import  locale
import  os import  optparse
import  pkgutil import  textwrap
import  sys import  sys



Clone # 829
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  platform import  os
import  os import  logging
import  pkgutil import  pickle
import  sys import  itertools



Clone # 830
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  logging import  locale
import  os import  optparse
import  time import  textwrap
import  itertools import  sys



Clone # 831
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  logging import  os
import  os import  logging
import  time import  pickle
import  itertools import  itertools



Clone # 832
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 4
Source file "../tests/beets/importer.py"
The first line is 18
from  requests.exceptions  import  ConnectionError from  __future__  import  print_function
 
import  errno import  os
import  logging import  logging
import  os import  pickle
import  re import  itertools



Clone # 833
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  division from  __future__  import  print_function
 
import  datetime import  locale
import  os import  optparse
import  socket import  textwrap
import  subprocess import  sys



Clone # 834
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  division from  __future__  import  print_function
 
import  datetime import  os
import  os import  logging
import  socket import  pickle
import  subprocess import  itertools



Clone # 835
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  print_function from  __future__  import  print_function
 
import  sys import  locale
import  tty import  optparse
import  fcntl import  textwrap
import  os import  sys



Clone # 836
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  print_function from  __future__  import  print_function
 
import  sys import  os
import  tty import  logging
import  fcntl import  pickle
import  os import  itertools



Clone # 837
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/functemplate.py"
The first line is 28
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  re import  locale
import  ast import  optparse
import  dis import  textwrap
import  types
 
import  sys



Clone # 838
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/functemplate.py"
The first line is 28
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  print_function
 
import  re import  os
import  ast import  logging
import  dis import  pickle
import  types
 
import  itertools



Clone # 839
Distance between two fragments = 3
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/util/__init__.py"
The first line is 16
from  __future__  import  unicode_literals from  __future__  import  division
 
import  logging import  os
import  sys import  sys
import  re import  re
import  signal
 
import  shutil



Clone # 840
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/util/confit.py"
The first line is 17
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
import  logging import  platform
import  sys import  os
import  re import  pkgutil
import  signal
 
import  sys



Clone # 841
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/util/functemplate.py"
The first line is 28
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  logging import  re
import  sys import  ast
import  re import  dis
import  signal
 
import  types
 



Clone # 842
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/ui/__init__.py"
The first line is 25
from  __future__  import  unicode_literals from  difflib  import  SequenceMatcher
import  logging import  logging
import  sys import  sqlite3
import  re import  errno
import  signal
 
import  re



Clone # 843
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/ui/__init__.py"
The first line is 19
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  logging import  locale
import  sys import  optparse
import  re import  textwrap
import  signal
 
import  sys



Clone # 844
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/ui/commands.py"
The first line is 18
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  logging import  logging
import  sys import  os
import  re import  time
import  signal
 
import  itertools



Clone # 845
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/importer.py"
The first line is 18
from  __future__  import  unicode_literals from  __future__  import  print_function
 
import  logging import  os
import  sys import  logging
import  re import  pickle
import  signal
 
import  itertools



Clone # 846
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  print_function
import  logging import  sys
import  sys import  tty
import  re import  fcntl
import  signal
 
import  os



Clone # 847
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/autotag/match.py"
The first line is 18
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  division
 
from  __future__  import  with_statement,  unicode_literals
import  datetime import  datetime
import  logging import  os
import  re import  sys
 
from  munkres  import  Munkres
 
from  django.contrib.admin.sites  import  AdminSite



Clone # 848
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 116
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 357
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  page_class  =  content_type.model_class()
page_class  =  content_type.model_class()



Clone # 849
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 84
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 357
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
page_class  =  content_type.model_class() page_class  =  content_type.model_class()



Clone # 850
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 116
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 140
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  page_class  =  content_type.model_class()
  page_class  =  content_type.model_class()



Clone # 851
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 84
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 140
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
page_class  =  content_type.model_class()   page_class  =  content_type.model_class()



Clone # 852
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 116
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 29
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
except  ContentType.DoesNotExist:
  raise  Http404
  page_class  =  content_type.model_class()
  desired_class  =  content_type.model_class()



Clone # 853
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 84
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 29
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
except  ContentType.DoesNotExist:
  raise  Http404
page_class  =  content_type.model_class()   desired_class  =  content_type.model_class()



Clone # 854
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 357
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 140
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
page_class  =  content_type.model_class()   page_class  =  content_type.model_class()



Clone # 855
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 357
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 29
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
except  ContentType.DoesNotExist:
  raise  Http404
page_class  =  content_type.model_class()   desired_class  =  content_type.model_class()



Clone # 856
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 140
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 29
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
except  ContentType.DoesNotExist:
  raise  Http404
  page_class  =  content_type.model_class()
  desired_class  =  content_type.model_class()



Clone # 857
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 92
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 73
if  form.is_valid():
  user  =  form.save()
  messages.success(request,  _("User  '{0}'  updated.").format(user))
  return  redirect('wagtailusers_index')
else:
  messages.error(request,  _("The  user  could  not  be  saved  due  to  errors."))
if  form.is_valid():
  user  =  form.save()
  messages.success(request,  _("User  '{0}'  created.").format(user))
  return  redirect('wagtailusers_index')
else:
  messages.error(request,  _("The  user  could  not  be  created  due  to  errors.")  )



Clone # 858
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 378
Source file "../tests/beets/library.py"
The first line is 350
  try:
    f  =  MediaFile(syspath(self.path))
  except  (OSError,  IOError)  as  exc:
    raise  util.FilesystemError(exc,  'read',  (self.path,),
      traceback.format_exc())
  try:
    f  =  MediaFile(syspath(read_path))
  except  (OSError,  IOError)  as  exc:
    raise  util.FilesystemError(exc,  'read',  (read_path,),
      traceback.format_exc())



Clone # 859
Distance between two fragments = 3
Clone size = 5
Source file "../tests/fig/tests/service_test.py"
The first line is 240
Source file "../tests/fig/tests/service_test.py"
The first line is 246
  def  test_start_container_creates_fixed_external_ports(self):
    service  =  self.create_service('web',  ports=['8000:8000'])
    container  =  service.start_container().inspect()
    self.assertIn('8000/tcp',  container['NetworkSettings']['Ports'])
    self.assertEqual(container['NetworkSettings']['Ports']['8000/tcp'][0]['HostPort'],  '8000')
  def  test_start_container_creates_fixed_external_ports_when_it_is_different_to_internal_port(self):
    service  =  self.create_service('web',  ports=['8001:8000'])
    container  =  service.start_container().inspect()
    self.assertIn('8000/tcp',  container['NetworkSettings']['Ports'])
    self.assertEqual(container['NetworkSettings']['Ports']['8000/tcp'][0]['HostPort'],  '8001')



Clone # 860
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 191
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()
  snippet_type_name  =  get_snippet_type_name(content_type)[0]
  snippet_type_name  =  get_snippet_type_name(content_type)[0]



Clone # 861
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 149
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()
  snippet_type_name  =  get_snippet_type_name(content_type)[0]
  snippet_type_name  =  get_snippet_type_name(content_type)[0]



Clone # 862
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 110
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 468
added.append(node_obj.pk) added.append(node_obj.pk)
if  'children'  in  node_struct:
  #  extending  the  stack  with  the  current  node  as  the  parent  of
  #  the  new  nodes
  stack.extend([
    (node_obj,  node)
    for  node  in  node_struct['children'][::-1]
  ])
if  'children'  in  node_struct:
  #  extending  the  stack  with  the  current  node  as  the  parent  of
  #  the  new  nodes
  stack.extend([
    (node_obj.pk,  node)
    for  node  in  node_struct['children'][::-1]
  ])



Clone # 863
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 322
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 369
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  a  new  object
    newobj  =  self.node_cls(**self.kwargs)
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  a  new  object
    newobj  =  self.node_cls(**self.kwargs)



Clone # 864
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 322
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 290
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  a  new  object
    newobj  =  self.node_cls(**self.kwargs)
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  the  new  object
    newobj  =  self.cls(**self.kwargs)



Clone # 865
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 369
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 290
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  a  new  object
    newobj  =  self.node_cls(**self.kwargs)
  if  self.instance:
    if  self.instance.pk:
      raise  ValueError("Attempted  to  add  a  tree  node  that  is  already  in  the  database")
    newobj  =  self.instance
  else:
    #  creating  the  new  object
    newobj  =  self.cls(**self.kwargs)



Clone # 866
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 525
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 136
  if  'id'  in  fields:
    #  this  happens  immediately  after  a  load_bulk
   
del  fields['id']
  if  'id'  in  fields:
    del  fields['id']
newobj  =  {'data':  fields} newobj  =  {'data':  fields}
  if  keep_ids:
    newobj['id']  =  serobj['pk']
  if  keep_ids:
    newobj['id']  =  pyobj['pk']



Clone # 867
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 136
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 599
  if  'id'  in  fields:
    del  fields['id']
  if  'id'  in  fields:
    #  this  happens  immediately  after  a  load_bulk
   
del  fields['id']
newobj  =  {'data':  fields} newobj  =  {'data':  fields}
  if  keep_ids:
    newobj['id']  =  pyobj['pk']
  if  keep_ids:
    newobj['id']  =  pyobj['pk']



Clone # 868
Distance between two fragments = 2
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 311
Source file "../tests/beets/library.py"
The first line is 608
  if  key  ==  'path':
    if  isinstance(value,  unicode):
      value  =  bytestring_path(value)
    elif  isinstance(value,  buffer):
      value  =  str(value)
if  key  ==  'artpath':
  if  isinstance(value,  unicode):
    value  =  bytestring_path(value)
  elif  isinstance(value,  buffer):
    value  =  bytes(value)



Clone # 869
Distance between two fragments = 2
Clone size = 5
Source file "../tests/beets/util/pipeline.py"
The first line is 406
Source file "../tests/beets/util/pipeline.py"
The first line is 435
def  produce():
  for  i  in  range(5):
    print('generating  %i'  %  i)
    time.sleep(1)
    yield  i
def  exc_produce():
  for  i  in  range(10):
    print('generating  %i'  %  i)
    time.sleep(1)
    yield  i



Clone # 870
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/autotag/__init__.py"
The first line is 219
Source file "../tests/beets/autotag/__init__.py"
The first line is 165
if  track_info.artist_id:
  item.mb_artistid  =  track_info.artist_id
else:
  item.mb_artistid  =  album_info.artist_id
if  track_info.artist:
  item.artist  =  track_info.artist
else:
  item.artist  =  album_info.artist
item.mb_albumartistid  =  album_info.artist_id item.albumartist  =  album_info.artist
  item.mb_releasegroupid  =  album_info.releasegroup_id
  item.album  =  album_info.album



Clone # 871
Distance between two fragments = 4
Clone size = 6
Source file "../tests/beets/autotag/match.py"
The first line is 209
Source file "../tests/beets/autotag/match.py"
The first line is 205
  if  likelies['catalognum']  and  album_info.catalognum:
    dist.add_string('catalognum',  likelies['catalognum'],
   
  album_info.catalognum)
  if  likelies['label']  and  album_info.label:
    dist.add_string('label',  likelies['label'],  album_info.label)
  if  likelies['albumdisambig']  and  album_info.albumdisambig:
    dist.add_string('albumdisambig',  likelies['albumdisambig'],
      album_info.albumdisambig)
  if  likelies['catalognum']  and  album_info.catalognum:
    dist.add_string('catalognum',  likelies['catalognum'],
      album_info.catalognum)



Clone # 872
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/tests/cli_test.py"
The first line is 49
Source file "../tests/fig/tests/cli_test.py"
The first line is 38
  self.command.dispatch(['-f',  'fig2.yml',  'ps'],  None)
  self.command.dispatch(['ps'],  None)
output  =  mock_stdout.getvalue() output  =  mock_stdout.getvalue()
self.assertNotIn('fig_simple_1',  output) self.assertIn('fig_simple_1',  output)
self.assertNotIn('fig_another_1',  output) self.assertIn('fig_another_1',  output)
  self.assertIn('fig_yetanother_1',  output)
  self.assertNotIn('fig_yetanother_1',  output)



Clone # 873
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/forms.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailadmin/forms.py"
The first line is 20
class  EmailLinkChooserForm(forms.Form):
    email_address  =  forms.EmailField(required=True)
 
 
class  ExternalLinkChooserForm(forms.Form):
    url  =  forms.URLField(required=True)
 
 
class  EmailLinkChooserWithLinkTextForm(forms.Form):
    email_address  =  forms.EmailField(required=True)
    link_text  =  forms.CharField(required=False)
 
 
class  ExternalLinkChooserWithLinkTextForm(forms.Form):
    url  =  forms.URLField(required=True)
    link_text  =  forms.CharField(required=True)
 
 



Clone # 874
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2286
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2258
table_output  =  self.template.render(context) table_output  =  self.template.render(context)
output_template  =  "opener.dismissRelatedLookupPopup(window,  '%i');" output_template  =  ('<input  type="checkbox"  class="action-select"  '
  for  object  in  model.objects.all():
    expected_output  =  output_template  %  object.pk
    assert  expected_output  in  table_output

  for  object  in  model.objects.all():
    expected_output  =  output_template  %  (object.pk,  object.pk,
      object.pk)

    assert  expected_output  in  table_output



Clone # 875
Distance between two fragments = 0
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 217
Source file "../tests/beets/util/confit.py"
The first line is 625
def  outsideFunc(self):
  return  "outside"
def  outsideFunc(self):
  return  "outside"
class  outsideClass:
  def  __init__(self):
      print  "outside"
   
class  outsideClass:
  def  __init__(self):
      print  "outside"
   



Clone # 876
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 263
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 252
  def  get_last_child(self):
    """
    :returns:

      The  rightmost  node's  child,  or  None  if  it  has  no  children.
    """
    try:
      return  self.get_children().reverse()[0]
    except  IndexError:
      return  None
  def  get_first_child(self):
    """
    :returns:

      The  leftmost  node's  child,  or  None  if  it  has  no  children.
    """
    try:
      return  self.get_children()[0]
    except  IndexError:
      return  None



Clone # 877
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 159
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 147
  def  get_last_root_node(cls):
    """
    :returns:

      The  last  root  node  in  the  tree  or  ``None``  if  it  is  empty.
    """
    try:
      return  cls.get_root_nodes().reverse()[0]
    except  IndexError:
      return  None
  def  get_first_root_node(cls):
    """
    :returns:

      The  first  root  node  in  the  tree  or  ``None``  if  it  is  empty.
    """
    try:
      return  cls.get_root_nodes()[0]
    except  IndexError:
      return  None



Clone # 878
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/autotag/hooks.py"
The first line is 479
Source file "../tests/beets/autotag/hooks.py"
The first line is 470
def  track_for_mbid(recording_id):
    """Get  a  TrackInfo  object  for  a  MusicBrainz  recording  ID.  Return  None
    if  the  ID  is  not  found.
    """
    try:
      return  mb.track_for_id(recording_id)
    except  mb.MusicBrainzAPIError  as  exc:
      exc.log(log)
 
def  album_for_mbid(release_id):
    """Get  an  AlbumInfo  object  for  a  MusicBrainz  release  ID.  Return  None
    if  the  ID  is  not  found.
    """
    try:
      return  mb.album_for_id(release_id)
    except  mb.MusicBrainzAPIError  as  exc:
      exc.log(log)
 



Clone # 879
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 25
class  MP_TestNode(MP_Node):
    steplen  =  3
 
    desc  =  models.CharField(max_length=255)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 
class  MP_UnicodeNode(MP_Node):
    steplen  =  3
 
    desc  =  models.CharField(max_length=255)
 
    def  __str__(self):    #  pragma:  no  cover
      return  self.desc
 
 



Clone # 880
Distance between two fragments = 2
Clone size = 5
Source file "../tests/beets/autotag/hooks.py"
The first line is 510
Source file "../tests/beets/autotag/hooks.py"
The first line is 517
  if  artist  and  album:
    try:
      out.extend(mb.match_album(artist,  album,  len(items)))
    except  mb.MusicBrainzAPIError  as  exc:
      exc.log(log)
  if  va_likely  and  album:
    try:
      out.extend(mb.match_album(None,  album,  len(items)))
    except  mb.MusicBrainzAPIError  as  exc:
      exc.log(log)



Clone # 881
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/main.py"
The first line is 150
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 37
headers  =  [
  'Name',
  'Command',
  'State',
  'Ports',
]
  queries  =  [
    "Hello  World",
    "Hello    World!!",
    "hello  world",
    "Hello'  world",
  ]



Clone # 882
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 9
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=2,
  description="Last  editors  pick",
)
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=0,
    description="First  editors  pick",
  )



Clone # 883
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 23
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 35
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=0,
  description="First  editors  pick",
)
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=1,
    description="Middle  editors  pick",
  )



Clone # 884
Distance between two fragments = 0
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 23
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 9
models.EditorsPick.objects.create(
  query=models.Query.get("root  page"),
  page_id=1,
  sort_order=0,
  description="First  editors  pick",
)
  models.EditorsPick.objects.create(
    query=models.Query.get("root  page"),
    page_id=1,
    sort_order=0,
    description="First  editors  pick",
  )



Clone # 885
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/docs/conf.py"
The first line is 14
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/setup.py"
The first line is 8
def  docs_dir():
    rd  =  os.path.dirname(__file__)
    if  rd:
      return  rd
    return  '.'
 
 
def  root_dir():
    rd  =  os.path.dirname(__file__)
    if  rd:
      return  rd
    return  '.'
 
 



Clone # 886
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/dbcore/query.py"
The first line is 310
Source file "../tests/beets/dbcore/query.py"
The first line is 301
class  OrQuery(MutableCollectionQuery):
    """A  conjunction  of  a  list  of  other  queries."""
    def  clause(self):
      return  self.clause_with_joiner('or')
 
    def  match(self,  item):
      return  any([q.match(item)  for  q  in  self.subqueries])
 
 
class  AndQuery(MutableCollectionQuery):
    """A  conjunction  of  a  list  of  other  queries."""
    def  clause(self):
      return  self.clause_with_joiner('and')
 
    def  match(self,  item):
      return  all([q.match(item)  for  q  in  self.subqueries])
 
 



Clone # 887
Distance between two fragments = 1
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 172
Source file "../tests/beets/mediafile.py"
The first line is 167
description  =  "" mime  =  ""
while  data[pos:pos  +  2]  !=  "\x00\x00":
  description  +=  data[pos:pos  +  2]
  pos  +=  2
while  data[pos:pos  +  2]  !=  "\x00\x00":
  mime  +=  data[pos:pos  +  2]
  pos  +=  2
pos  +=  2 pos  +=  2



Clone # 888
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 693
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 685
  js_template  =  "wagtailadmin/edit_handlers/inline_panel.js"
  template  =  "wagtailadmin/edit_handlers/inline_panel.html"
  def  render_js(self):
    return  mark_safe(render_to_string(self.js_template,  {
      'self':  self,
      'can_order':  self.formset.can_order,
    }))

  def  render(self):
    return  mark_safe(render_to_string(self.template,  {
      'self':  self,
      'can_order':  self.formset.can_order,
    }))



Clone # 889
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/dbcore/query.py"
The first line is 445
Source file "../tests/beets/dbcore/query.py"
The first line is 210
if  self.start  is  not  None  and  date  <  self.start:
  return  False
if  self.rangemin  is  not  None  and  value  <  self.rangemin:
  return  False
if  self.end  is  not  None  and  date  >=  self.end:
  return  False
if  self.rangemax  is  not  None  and  value  >  self.rangemax:
  return  False
  return  True
  return  True



Clone # 890
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 664
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 670
  def  test_add_sibling_last_root(self,  model):
    node_wchildren  =  model.objects.get(desc='2')
    obj  =  node_wchildren.add_sibling('last-sibling',  desc='5')
    assert  obj.get_depth()  ==  1
    assert  node_wchildren.get_last_sibling().desc  ==  '5'
  def  test_add_sibling_last(self,  model):
    node  =  model.objects.get(desc='231')
    obj  =  node.add_sibling('last-sibling',  desc='232')
    assert  obj.get_dept
h()  ==  3
    asse
rt  node.get_last_sibling().desc  ==  '232'



Clone # 891
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/dbcore/query.py"
The first line is 328
Source file "../tests/beets/dbcore/query.py"
The first line is 319
class  FalseQuery(Query):
    """A  query  that  never  matches."""
    def  clause(self):
      return  '0',  ()
 
    def  match(self,  item):
      return  False
 
 
 
class  TrueQuery(Query):
    """A  query  that  always  matches."""
    def  clause(self):
      return  '1',  ()
 
    def  match(self,  item):
      return  True
 
 



Clone # 892
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/dbcore/query.py"
The first line is 328
Source file "../tests/beets/dbcore/query.py"
The first line is 22
class  FalseQuery(Query):
    """A  query  that  never  matches."""
    def  clause(self):
      return  '0',  ()
 
    def  match(self,  item):
      return  False
 
 
 
class  Query(object):
    """An  abstract  class  representing  a  query  into  the  item  database.
   
"""
    def  clause(self):
      """Generate  an  SQLite  expression  implementing  the  query.
      Return  a  clause  string,  a  sequence  of  substitution  values  for
      the  clause,  and  a  Query  object  representing  the  "remainder"
      Returns  (clause,  subvals)  where  clause  is  a  valid  sqlite
      WHERE  clause  implementing  the  query  and  subvals  is  a  list  of
      items  to  be  substituted  for  ?s  in  the  clause.
      """
      return  None
,  ()
 
    def  match(self,  item):
      """Check  whether  this  query  matches  a  given  Item.  Can  be  used  to
      perform  queries  on  arbitrary  sets  of  Items.
      """
      raise  NotImplementedError
 
 



Clone # 893
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/dbcore/query.py"
The first line is 319
Source file "../tests/beets/dbcore/query.py"
The first line is 22
class  TrueQuery(Query):
    """A  query  that  always  matches."""
    def  clause(self):
      return  '1',  ()
 
    def  match(self,  item):
      return  True
 
 
class  Query(object):
    """An  abstract  class  representing  a  query  into  the  item  database.
   
"""
    def  clause(self):
      """Generate  an  SQLite  expression  implementing  the  query.
      Return  a  clause  string,  a  sequence  of  substitution  values  for
      the  clause,  and  a  Query  object  representing  the  "remainder"
      Returns  (clause,  subvals)  where  clause  is  a  valid  sqlite
      WHERE  clause  implementing  the  query  and  subvals  is  a  list  of
      items  to  be  substituted  for  ?s  in  the  clause.
      """
      return  None
,  ()
 
    def  match(self,  item):
      """Check  whether  this  query  matches  a  given  Item.  Can  be  used  to
      perform  queries  on  arbitrary  sets  of  Items.
      """
      raise  NotImplementedError
 
 



Clone # 894
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 197
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 104
post_data  =  {
  'title':  "I've  been  edited!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}
post_data  =  {
  'title':  "New  page!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}



Clone # 895
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 131
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 197
post_data  =  {
  'title':  "New  page!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}
post_data  =  {
  'title':  "I've  been  edited!",
  'content':  "Some  content",
  'slug':  'hello-world',
  'action-publish':  "Publish",
}



Clone # 896
Distance between two fragments = 2
Clone size = 6
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 527
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 436
  def  inspect_container(self,  container):
    if  isinstance(container,  dict):
      container  =  container.get('Id')
    return  self._result(
     
self._get(self._url("/containers/{0}/json".format(container))),
   
  True)
  def  diff(self,  container):
    if  isinstance(container,  dict):
      container  =  container.get('Id')
    return  self._result(self._get(self._url("/containers/{0}/changes".
       
format(container))),  True)



Clone # 897
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 543
Source file "../tests/wagtail/runtests.py"
The first line is 15
  try:
    import  fcntl
    import  termios
  except  ImportError:
    return  fallback
  try:
    import  elasticutils
    has_elasticsearch  =  True
  except  ImportError:
    has_elasticsearch  =  False



Clone # 898
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1622
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1614
method  =  root.add_child method  =  mpsmallstep_model.add_root
for  i  in  range(1,  10):
  method()
for  i  in  range(1,  10):
  method()
  with  pytest.raises(PathOverflow):
    method()
  with  pytest.raises(PathOverflow):
    method()



Clone # 899
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 100
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 457
parent,  node_struct  =  stack.pop() parent_id,  node_struct  =  stack.pop()
node_data  =  node_struct['data'].copy() node_data  =  node_struct['data'].copy()
cls._process_foreign_keys(foreign_keys,  node_data) cls._process_foreign_keys(foreign_keys,  node_data)
if  keep_ids:
  node_data['id']  =  node_struct['id']
if  keep_ids:
  node_data['id']  =  node_struct['id']



Clone # 900
Distance between two fragments = 3
Clone size = 5
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 62
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 41
sorted_services  =  sort_service_dicts(services) sorted_services  =  sort_service_dicts(services)
self.assertEqual(len(sorted_services),  3) self.assertEqual(len(sorted_services),  3)
self.assertEqual(sorted_services[0]['name'],  'child') self.assertEqual(sorted_services[0]['name'],  'redis')
self.assertEqual(sorted_services[1]['name'],  'parent') self.assertEqual(sorted_services[1]['name'],  'postgres')
  self.assertEqual(sorted_services[2]['name'],  'grandparent')
  self.assertEqual(sorted_services[2]['name'],  'web')



Clone # 901
Distance between two fragments = 3
Clone size = 5
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 62
Source file "../tests/fig/tests/sort_service_test.py"
The first line is 20
sorted_services  =  sort_service_dicts(services) sorted_services  =  sort_service_dicts(services)
self.assertEqual(len(sorted_services),  3) self.assertEqual(len(sorted_services),  3)
self.assertEqual(sorted_services[0]['name'],  'child') self.assertEqual(sorted_services[0]['name'],  'grunt')
self.assertEqual(sorted_services[1]['name'],  'parent') self.assertEqual(sorted_services[1]['name'],  'redis')
  self.assertEqual(sorted_services[2]['name'],  'grandparent')
  self.assertEqual(sorted_services[2]['name'],  'web')



Clone # 902
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 167
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 152
  response  =  self.post({
    'old_path':  '',
    'is_permanent':  'on',
    'redirect_link':  'http://www.test.com/ive-been-edited',
  })
  response  =  self.post({
    'old_path':  '/test',
    'is_permanent':  'on',
    'redirect_link':  'http://www.test.com/ive-been-edited',
  })
  self.assertEqual(response.status_code,  200)
  self.assertEqual(response.status_code,  302)



Clone # 903
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 120
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 105
  response  =  self.post({
    'old_path':  '',
    'is_permanent':  'on',
    'redirect_link':  'http://www.test.com/',
  })
  response  =  self.post({
    'old_path':  '/test',
    'is_permanent':  'on',
    'redirect_link':  'http://www.test.com/',
  })
  self.assertEqual(response.status_code,  200)

  self.assertEqual(response.status_code,  302)



Clone # 904
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 97
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 69
  new_query  =  models.Query.get(query_form['query_string'].value())
  query  =  models.Query.get(query_form['query_string'].value())
  editors_pick_formset  =  forms.EditorsPickFormSet(request.POST,  instance=query)
  editors_pick_formset  =  forms.EditorsPickFormSet(request.POST,  instance=query)
if  save_editorspicks(query,  new_query,  editors_pick_formset):
  messages.success(request,  _("Editor's  picks  for  '{0}'  updated.").format(new_query))
  return  redirect('wagtailsearch_editorspicks_index')
if  save_editorspicks(query,  query,  editors_pick_formset):
  messages.success(request,  _("Editor's  picks  for  '{0}'  created.").format(query))
  return  redirect('wagtailsearch_editorspicks_index')



Clone # 905
Distance between two fragments = 2
Clone size = 5
Source file "../tests/fig/tests/service_test.py"
The first line is 172
Source file "../tests/fig/tests/service_test.py"
The first line is 164
db  =  self.create_service('db') db  =  self.create_service('db')
web  =  self.create_service('web',  links=[(db,  'custom_link_name')]) web  =  self.create_service('web',  links=[(db,  None)])
db.start_container() db.start_container()
web.start_container() web.start_container()
  self.assertIn('custom_link_name',  web.containers()[0].links())
self.assertIn('figtest_db_1',  web.containers()[0].links())



Clone # 906
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 200
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 147
christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/') unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')
  unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')
  someone_elses_event_page  =  EventPage.objects.get(url_path='/home/events/someone-elses-event/')
homepage_perms  =  homepage.permissions_for_user(event_moderator) homepage_perms  =  homepage.permissions_for_user(event_editor)
christmas_page_perms  =  christmas_page.permissions_for_user(event_moderator) christmas_page_perms  =  christmas_page.permissions_for_user(event_editor)
  unpub_perms  =  unpublished_event_page.permissions_for_user(event_moderator)
unpub_perms  =  unpublished_event_page.permissions_for_user(event_editor)



Clone # 907
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1974
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1960
instance_grandchild  =  model.objects.get(desc='231') instance_child  =  model.objects.get(desc='21')
form  =  form_class(instance=instance_grandchild) form  =  form_class(instance=instance_child)
  assert  form._get_position_ref_node(instance_grandchild)  ==  {
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='23').pk
  }
  assert  form._get_position_ref_node(instance_child)  ==  {
    '_position':  'first-child',
    '_ref_node_id':  model.objects.get(desc='2').pk
  }



Clone # 908
Distance between two fragments = 1
Clone size = 5
Source file "../tests/beets/util/pipeline.py"
The first line is 246
Source file "../tests/beets/util/pipeline.py"
The first line is 199
  for  msg  in  _allmsgs(out):
    with  self.abort_lock:
      if  self.abort_flag:
        return
    self.out_queue.put(msg)
  for  msg  in  _allmsgs(msg):
    with  self.abort_lock:
      if  self.abort_flag:
        return
    self.out_queue.put(msg)



Clone # 909
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 207
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 181
  return  render(request,  'wagtailadmin/pages/create.html',  {
    'content_type':  content_type,
    'page_class':  page_class,
    'parent_page':  parent_page,
    'edit_handler':  edit_handler,
  })

  return  render(request,  'wagtailsnippets/snippets/edit.html',  {
    'content_type':  content_type,
    'snippet_type_name':  snippet_type_name,
    'instance':  instance,
    'edit_handler':  edit_handler,
  })



Clone # 910
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 181
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 98
  return  render(request,  'wagtailsnippets/snippets/edit.html',  {
    'content_type':  content_type,
    'snippet_type_name':  snippet_type_name,
    'instance':  instance,
    'edit_handler':  edit_handler
,
  })

  return  render(request,  'wagtailsnippets/snippets/type_index.html',  {
    'content_type':  content_type,
    'snippet_type_name':  snippet_type_name,
    'snippet_type_name_plural':  snippet_type_name_plural,
    'items':  items
,
  })



Clone # 911
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 261
  for  fn  in  hooks.get_hooks('after_delete_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
  for  fn  in  hooks.get_hooks('after_edit_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
  return  redirect('wagtailadmin_explore',  parent_id)
return  redirect('wagtailadmin_explore',  page.get_parent().id)



Clone # 912
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 194
  for  fn  in  hooks.get_hooks('after_delete_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
  for  fn  in  hooks.get_hooks('after_create_page'):
    result  =  fn(request,  page)
    if  hasattr(result,  'status_code'):
      return  result
  return  redirect('wagtailadmin_explore',  parent_id)
return  redirect('wagtailadmin_explore',  page.get_parent().id)



Clone # 913
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/dbcore/db.py"
The first line is 17
Source file "../tests/beets/util/__init__.py"
The first line is 21
import  time import  shutil
import  os import  fnmatch
from  collections  import  defaultdict from  collections  import  defaultdict
import  threading import  traceback
import  sqlite3 import  subprocess
 



Clone # 914
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/autotag/__init__.py"
The first line is 17
Source file "../tests/beets/autotag/match.py"
The first line is 20
import  os import  datetime
import  logging import  logging
import  re
 
import  re
from  beets  import  library,  mediafile,  config from  munkres  import  Munkres
 
from  beets.util  import  sorted_walk,  ancestry,  displayable_path
 
from  beets  import  plugins



Clone # 915
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 22
Source file "../tests/beets/util/artresizer.py"
The first line is 18
import  optparse import  urllib
import  textwrap import  subprocess
import  sys import  os
from  difflib  import  SequenceMatcher from  tempfile  import  NamedTemporaryFile
import  logging import  logging



Clone # 916
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  base64 import  shlex
import  fileinput import  struct
 
import  json import  requests
import  os
 
import  requests.exceptions
from  fig.packages  import  six
 
from  fig.packages  import  six
 



Clone # 917
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  threading import  time
import  sqlite3 import  itertools
import  contextlib
 
import  re
 
import  beets import  beets
from  beets.util.functemplate  import  Template from  beets  import  util



Clone # 918
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/importer.py"
The first line is 20
import  sys import  os
import  re import  logging
import  shutil import  pickle
import  fnmatch import  itertools
from  collections  import  defaultdict from  collections  import  defaultdict
 



Clone # 919
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  logging import  errno
import  musicbrainzngs import  re
import  re import  struct
import  traceback import  traceback
 
from  urlparse  import  urljoin
 
from  beets  import  library



Clone # 920
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  logging import  time
import  musicbrainzngs import  itertools
import  re import  re
 
import  traceback import  beets
from  urlparse  import  urljoin
 
from  beets  import  util



Clone # 921
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  io import  base64
import  tarfile import  fileinput
import  tempfile
 
import  json
import  requests import  os
 
from  fig.packages  import  six
 
 
from  fig.packages  import  six
 



Clone # 922
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  io import  shlex
import  tarfile import  struct
 
import  tempfile
 
import  requests
import  requests import  requests.exceptions
from  fig.packages  import  six
 
 
from  fig.packages  import  six
 



Clone # 923
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  os import  logging
import  sys import  time
import  re import  itertools
import  shutil import  re
 
import  fnmatch import  beets



Clone # 924
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 20
import  os import  logging
import  sys import  shlex
import  re import  unicodedata
import  shutil import  traceback
import  fnmatch import  time



Clone # 925
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  os import  re
import  sys import  shlex
import  re import  struct
 
import  shutil import  requests
import  fnmatch import  requests.exceptions



Clone # 926
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  errno import  sqlite3
import  logging import  errno
import  os import  re
import  re import  struct
import  yaml import  traceback
 



Clone # 927
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  errno import  logging
import  logging import  time
import  os import  itertools
import  re import  re
 
import  yaml import  beets



Clone # 928
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/library.py"
The first line is 20
import  errno import  logging
import  logging import  shlex
import  os import  unicodedata
import  re import  traceback
import  yaml import  time



Clone # 929
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  errno import  re
import  logging import  shlex
import  os import  struct
 
import  re import  requests
import  yaml import  requests.exceptions



Clone # 930
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  datetime import  sqlite3
import  os import  errno
import  socket import  re
import  subprocess import  struct
import  platform import  traceback
 



Clone # 931
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  datetime import  logging
import  os import  time
import  socket import  itertools
import  subprocess import  re
 
import  platform import  beets



Clone # 932
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 20
import  datetime import  logging
import  os import  shlex
import  socket import  unicodedata
import  subprocess import  traceback
import  platform import  time



Clone # 933
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  datetime import  re
import  os import  shlex
import  socket import  struct
 
import  subprocess import  requests
import  platform import  requests.exceptions



Clone # 934
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/confit.py"
The first line is 19
import  socket import  os
import  select import  pkgutil
import  sys import  sys
import  types import  yaml
import  errno import  types



Clone # 935
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 19
import  platform import  os
import  os import  pkgutil
import  pkgutil import  sys
import  sys import  yaml
import  yaml import  types



Clone # 936
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/util/confit.py"
The first line is 19
import  logging import  os
import  sqlite3 import  pkgutil
import  errno import  sys
import  re import  yaml
import  struct import  types



Clone # 937
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 19
import  logging import  os
import  os import  pkgutil
import  time import  sys
import  itertools import  yaml
import  codecs import  types



Clone # 938
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 19
import  os import  os
import  ConfigParser import  pkgutil
import  codecs import  sys
import  yaml import  yaml
import  logging import  types



Clone # 939
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 19
import  os import  os
import  re import  pkgutil
import  sys import  sys
import  logging import  yaml
import  shlex import  types



Clone # 940
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 19
import  sys import  os
import  tty import  pkgutil
import  fcntl import  sys
import  os import  yaml
import  termios import  types



Clone # 941
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 19
import  json import  os
import  re import  pkgutil
import  shlex import  sys
import  struct
 
import  yaml
import  requests import  types



Clone # 942
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  socket import  types
import  select import  errno
import  sys import  traceback
import  types import  time
import  errno import  collections
 
 



Clone # 943
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  platform import  types
import  os import  errno
import  pkgutil import  traceback
import  sys import  time
import  yaml import  collections
 
 



Clone # 944
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  logging import  types
import  sqlite3 import  errno
import  errno import  traceback
import  re import  time
import  struct import  collections
 
 



Clone # 945
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  logging import  types
import  os import  errno
import  time import  traceback
import  itertools import  time
import  codecs import  collections
 
 



Clone # 946
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  os import  types
import  ConfigParser import  errno
import  codecs import  traceback
import  yaml import  time
import  logging import  collections
 
 



Clone # 947
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  os import  types
import  re import  errno
import  sys import  traceback
import  logging import  time
import  shlex import  collections
 
 



Clone # 948
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  sys import  types
import  tty import  errno
import  fcntl import  traceback
import  os import  time
import  termios import  collections
 
 



Clone # 949
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  json import  types
import  re import  errno
import  shlex import  traceback
import  struct
 
import  time
import  requests import  collections
 
 



Clone # 950
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  socket import  os
import  select import  termios
import  sys import  threading
import  types import  errno
 
import  errno import  logging



Clone # 951
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  platform import  os
import  os import  termios
import  pkgutil import  threading
import  sys import  errno
 
import  yaml import  logging



Clone # 952
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  logging import  os
import  sqlite3 import  termios
import  errno import  threading
import  re import  errno
 
import  struct import  logging



Clone # 953
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  logging import  os
import  os import  termios
import  time import  threading
import  itertools import  errno
 
import  codecs import  logging



Clone # 954
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  os import  os
import  ConfigParser import  termios
import  codecs import  threading
import  yaml import  errno
 
import  logging import  logging



Clone # 955
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  os import  os
import  re import  termios
import  sys import  threading
import  logging import  errno
 
import  shlex import  logging



Clone # 956
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  sys import  os
import  tty import  termios
import  fcntl import  threading
import  os import  errno
 
import  termios import  logging



Clone # 957
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  json import  os
import  re import  termios
import  shlex import  threading
import  struct
 
import  errno
 
import  requests import  logging



Clone # 958
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  time import  sys
import  itertools import  re
import  codecs import  shutil
import  platform
 
import  fnmatch



Clone # 959
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  time import  logging
import  itertools import  os
import  codecs import  re
import  platform
 
import  yaml



Clone # 960
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 21
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  time import  os
import  itertools import  socket
import  codecs import  subprocess
import  platform
 
import  platform



Clone # 961
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 10
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  sys import  os
import  types import  sys
import  errno import  re
import  traceback import  shutil
import  time import  fnmatch



Clone # 962
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 10
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  sys import  errno
import  types import  logging
import  errno import  os
import  traceback import  re
import  time import  yaml



Clone # 963
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 10
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  sys import  datetime
import  types import  os
import  errno import  socket
import  traceback import  subprocess
import  time import  platform



Clone # 964
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  select import  os
import  sys import  sys
import  types import  re
import  errno import  shutil
import  traceback import  fnmatch



Clone # 965
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  select import  errno
import  sys import  logging
import  types import  os
import  errno import  re
import  traceback import  yaml



Clone # 966
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 9
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  select import  datetime
import  sys import  os
import  types import  socket
import  errno import  subprocess
import  traceback import  platform



Clone # 967
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  socket import  os
import  select import  sys
import  sys import  re
import  types import  shutil
import  errno import  fnmatch



Clone # 968
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  socket import  sqlite3
import  select import  errno
import  sys import  re
import  types import  struct
import  errno import  traceback
 



Clone # 969
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  socket import  logging
import  select import  time
import  sys import  itertools
import  types import  re
 
import  errno import  beets



Clone # 970
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/library.py"
The first line is 20
import  socket import  logging
import  select import  shlex
import  sys import  unicodedata
import  types import  traceback
import  errno import  time



Clone # 971
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  socket import  errno
import  select import  logging
import  sys import  os
import  types import  re
import  errno import  yaml



Clone # 972
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  socket import  datetime
import  select import  os
import  sys import  socket
import  types import  subprocess
import  errno import  platform



Clone # 973
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  socket import  re
import  select import  shlex
import  sys import  struct
 
import  types import  requests
import  errno import  requests.exceptions



Clone # 974
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  platform import  sqlite3
import  os import  errno
import  pkgutil import  re
import  sys import  struct
import  yaml import  traceback
 



Clone # 975
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  platform import  logging
import  os import  time
import  pkgutil import  itertools
import  sys import  re
 
import  yaml import  beets



Clone # 976
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 20
import  platform import  logging
import  os import  shlex
import  pkgutil import  unicodedata
import  sys import  traceback
import  yaml import  time



Clone # 977
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  platform import  re
import  os import  shlex
import  pkgutil import  struct
 
import  sys import  requests
import  yaml import  requests.exceptions



Clone # 978
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  logging import  sqlite3
import  sqlite3 import  errno
import  errno import  re
import  re import  struct
import  struct import  traceback
 



Clone # 979
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  logging import  logging
import  sqlite3 import  time
import  errno import  itertools
import  re import  re
 
import  struct import  beets



Clone # 980
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/library.py"
The first line is 20
import  logging import  logging
import  sqlite3 import  shlex
import  errno import  unicodedata
import  re import  traceback
import  struct import  time



Clone # 981
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  logging import  re
import  sqlite3 import  shlex
import  errno import  struct
 
import  re import  requests
import  struct import  requests.exceptions



Clone # 982
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  logging import  sqlite3
import  os import  errno
import  time import  re
import  itertools import  struct
import  codecs import  traceback
 



Clone # 983
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  logging import  logging
import  os import  time
import  time import  itertools
import  itertools import  re
 
import  codecs import  beets



Clone # 984
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 20
import  logging import  logging
import  os import  shlex
import  time import  unicodedata
import  itertools import  traceback
import  codecs import  time



Clone # 985
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  logging import  re
import  os import  shlex
import  time import  struct
 
import  itertools import  requests
import  codecs import  requests.exceptions



Clone # 986
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 21
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  yaml import  os
import  logging import  sys
import  time import  re
import  itertools import  shutil
import  re
 
import  fnmatch



Clone # 987
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 21
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  yaml import  errno
import  logging import  logging
import  time import  os
import  itertools import  re
import  re
 
import  yaml



Clone # 988
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 21
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  yaml import  datetime
import  logging import  os
import  time import  socket
import  itertools import  subprocess
import  re
 
import  platform



Clone # 989
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  codecs import  os
import  yaml import  sys
import  logging import  re
import  time import  shutil
import  itertools import  fnmatch



Clone # 990
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  codecs import  errno
import  yaml import  logging
import  logging import  os
import  time import  re
import  itertools import  yaml



Clone # 991
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 20
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  codecs import  datetime
import  yaml import  os
import  logging import  socket
import  time import  subprocess
import  itertools import  platform



Clone # 992
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  ConfigParser import  os
import  codecs import  sys
import  yaml import  re
import  logging import  shutil
import  time import  fnmatch



Clone # 993
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  ConfigParser import  errno
import  codecs import  logging
import  yaml import  os
import  logging import  re
import  time import  yaml



Clone # 994
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 19
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  ConfigParser import  datetime
import  codecs import  os
import  yaml import  socket
import  logging import  subprocess
import  time import  platform



Clone # 995
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  ConfigParser import  sys
import  codecs import  re
import  yaml import  shutil
import  logging import  fnmatch



Clone # 996
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  os import  sqlite3
import  ConfigParser import  errno
import  codecs import  re
import  yaml import  struct
import  logging import  traceback
 



Clone # 997
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  os import  logging
import  ConfigParser import  time
import  codecs import  itertools
import  yaml import  re
 
import  logging import  beets



Clone # 998
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/library.py"
The first line is 20
import  os import  logging
import  ConfigParser import  shlex
import  codecs import  unicodedata
import  yaml import  traceback
import  logging import  time



Clone # 999
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  ConfigParser import  logging
import  codecs import  os
import  yaml import  re
import  logging import  yaml



Clone # 1000
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  ConfigParser import  os
import  codecs import  socket
import  yaml import  subprocess
import  logging import  platform



Clone # 1001
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  os import  re
import  ConfigParser import  shlex
import  codecs import  struct
 
import  yaml import  requests
import  logging import  requests.exceptions



Clone # 1002
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 19
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  sys import  os
import  logging import  sys
import  shlex import  re
import  unicodedata import  shutil
import  traceback import  fnmatch



Clone # 1003
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 19
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  sys import  errno
import  logging import  logging
import  shlex import  os
import  unicodedata import  re
import  traceback import  yaml



Clone # 1004
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 19
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  sys import  datetime
import  logging import  os
import  shlex import  socket
import  unicodedata import  subprocess
import  traceback import  platform



Clone # 1005
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  re import  os
import  sys import  sys
import  logging import  re
import  shlex import  shutil
import  unicodedata import  fnmatch



Clone # 1006
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  re import  errno
import  sys import  logging
import  logging import  os
import  shlex import  re
import  unicodedata import  yaml



Clone # 1007
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 18
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  re import  datetime
import  sys import  os
import  logging import  socket
import  shlex import  subprocess
import  unicodedata import  platform



Clone # 1008
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  re import  sys
import  sys import  re
import  logging import  shutil
import  shlex import  fnmatch



Clone # 1009
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  os import  sqlite3
import  re import  errno
import  sys import  re
import  logging import  struct
import  shlex import  traceback
 



Clone # 1010
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  os import  logging
import  re import  time
import  sys import  itertools
import  logging import  re
 
import  shlex import  beets



Clone # 1011
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 20
import  os import  logging
import  re import  shlex
import  sys import  unicodedata
import  logging import  traceback
import  shlex import  time



Clone # 1012
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  re import  logging
import  sys import  os
import  logging import  re
import  shlex import  yaml



Clone # 1013
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  re import  os
import  sys import  socket
import  logging import  subprocess
import  shlex import  platform



Clone # 1014
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  os import  re
import  re import  shlex
import  sys import  struct
 
import  logging import  requests
import  shlex import  requests.exceptions



Clone # 1015
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  fcntl import  os
import  os import  sys
import  termios import  re
import  threading import  shutil
import  errno
 
import  fnmatch



Clone # 1016
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  fcntl import  errno
import  os import  logging
import  termios import  os
import  threading import  re
import  errno
 
import  yaml



Clone # 1017
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  fcntl import  datetime
import  os import  os
import  termios import  socket
import  threading import  subprocess
import  errno
 
import  platform



Clone # 1018
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  tty import  os
import  fcntl import  sys
import  os import  re
import  termios import  shutil
import  threading import  fnmatch



Clone # 1019
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  tty import  errno
import  fcntl import  logging
import  os import  os
import  termios import  re
import  threading import  yaml



Clone # 1020
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  tty import  datetime
import  fcntl import  os
import  os import  socket
import  termios import  subprocess
import  threading import  platform



Clone # 1021
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  sys import  sqlite3
import  tty import  errno
import  fcntl import  re
import  os import  struct
import  termios import  traceback
 



Clone # 1022
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  sys import  logging
import  tty import  time
import  fcntl import  itertools
import  os import  re
 
import  termios import  beets



Clone # 1023
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 20
import  sys import  logging
import  tty import  shlex
import  fcntl import  unicodedata
import  os import  traceback
import  termios import  time



Clone # 1024
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  sys import  re
import  tty import  shlex
import  fcntl import  struct
 
import  os import  requests
import  termios import  requests.exceptions



Clone # 1025
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  json import  os
import  re import  sys
import  shlex import  re
import  struct
 
import  shutil
import  requests import  fnmatch



Clone # 1026
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  json import  sqlite3
import  re import  errno
import  shlex import  re
import  struct
 
import  struct
import  requests import  traceback
 



Clone # 1027
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  json import  logging
import  re import  time
import  shlex import  itertools
import  struct
 
import  re
 
import  requests import  beets



Clone # 1028
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 20
import  json import  logging
import  re import  shlex
import  shlex import  unicodedata
import  struct
 
import  traceback
import  requests import  time



Clone # 1029
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  json import  errno
import  re import  logging
import  shlex import  os
import  struct
 
import  re
import  requests import  yaml



Clone # 1030
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  json import  datetime
import  re import  os
import  shlex import  socket
import  struct
 
import  subprocess
import  requests import  platform



Clone # 1031
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  json import  re
import  re import  shlex
import  shlex import  struct
 
import  struct
 
import  requests
import  requests import  requests.exceptions



Clone # 1032
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 19
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  pkgutil import  sys
import  sys import  re
import  yaml import  shutil
import  types import  fnmatch



Clone # 1033
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 19
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  pkgutil import  logging
import  sys import  os
import  yaml import  re
import  types import  yaml



Clone # 1034
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/confit.py"
The first line is 19
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  pkgutil import  os
import  sys import  socket
import  yaml import  subprocess
import  types import  platform



Clone # 1035
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 11
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  types import  os
import  errno import  sys
import  traceback import  re
import  time import  shutil
import  collections
 
 
import  fnmatch



Clone # 1036
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 11
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  types import  errno
import  errno import  logging
import  traceback import  os
import  time import  re
import  collections
 
 
import  yaml



Clone # 1037
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/util/bluelet.py"
The first line is 11
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  types import  datetime
import  errno import  os
import  traceback import  socket
import  time import  subprocess
import  collections
 
 
import  platform



Clone # 1038
Distance between two fragments = 4
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  termios import  sys
import  threading import  re
import  errno
 
import  shutil
import  logging import  fnmatch



Clone # 1039
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  termios import  logging
import  threading import  os
import  errno
 
import  re
import  logging import  yaml



Clone # 1040
Distance between two fragments = 5
Clone size = 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  termios import  os
import  threading import  socket
import  errno
 
import  subprocess
import  logging import  platform



Clone # 1041
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  time import  socket
import  itertools import  select
import  codecs import  sys
import  platform
 
import  types
import  beets import  errno



Clone # 1042
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  time import  os
import  itertools import  sys
import  codecs import  re
import  platform
 
import  shutil
import  beets import  fnmatch



Clone # 1043
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/util/confit.py"
The first line is 18
import  time import  platform
import  itertools import  os
import  codecs import  pkgutil
import  platform
 
import  sys
import  beets import  yaml



Clone # 1044
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  time import  logging
import  itertools import  sqlite3
import  codecs import  errno
import  platform
 
import  re
import  beets import  struct



Clone # 1045
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  time import  logging
import  itertools import  os
import  codecs import  time
import  platform
 
import  itertools
import  beets import  codecs



Clone # 1046
Distance between two fragments = 4
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  time import  os
import  itertools import  ConfigParser
import  codecs import  codecs
import  platform
 
import  yaml
import  beets import  logging



Clone # 1047
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/beets/library.py"
The first line is 17
import  time import  os
import  itertools import  re
import  codecs import  sys
import  platform
 
import  logging
import  beets import  shlex



Clone # 1048
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  time import  errno
import  itertools import  logging
import  codecs import  os
import  platform
 
import  re
import  beets import  yaml



Clone # 1049
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  time import  datetime
import  itertools import  os
import  codecs import  socket
import  platform
 
import  subprocess
import  beets import  platform



Clone # 1050
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  time import  sys
import  itertools import  tty
import  codecs import  fcntl
import  platform
 
import  os
import  beets import  termios



Clone # 1051
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/ui/commands.py"
The first line is 22
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  time import  json
import  itertools import  re
import  codecs import  shlex
import  platform
 
import  struct
 
import  beets import  requests



Clone # 1052
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 537
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 495
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_last_child()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_next_sibling()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected



Clone # 1053
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 537
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 478
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_last_child()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_prev_sibling()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected



Clone # 1054
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 523
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 495
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_first_child()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_next_sibling()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected



Clone # 1055
Distance between two fragments = 1
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 523
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 478
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_first_child()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected
  for  desc,  expected  in  data:
    node  =  model.objects.get(desc=desc).get_prev_sibling()
    if  expected  is  None:
      assert  node  is  None
    else:
      assert  node.desc  ==  expected



Clone # 1056
Distance between two fragments = 3
Clone size = 5
Source file "../tests/beets/autotag/hooks.py"
The first line is 286
Source file "../tests/beets/autotag/hooks.py"
The first line is 295
  def  max_distance(self):
    """Return  the  maximum  distance  penalty  (normalization  factor).
    """
    dist_max  =  0.0
    for  key,  penalty  in  self._penalties.iteritems():
      dist_max  +=  len
(penalty)  *  self._weights[key]
    return  dist_max
  def  raw_distance(self):
    """Return  the  raw  (denor
malized)  distance.
    """
    dist_raw  =  0.0
    for  key,  penalty  in  self._penalties.iteritems(
):
      dist_raw  +=  sum(penalty)  *  self._weights[key]
    return  dist_raw



Clone # 1057
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 129
Source file "../tests/wagtail/wagtail/tests/models.py"
The first line is 73
  panels  =  [
    FieldPanel('first_name'),
    FieldPanel('last_name'),

    ImageChooserPanel('image'),
    MultiFieldPanel(LinkFields.panels,  "Link"),
  ]

  panels  =  [
    ImageChooserPanel('image'),
    FieldPanel('embed_url'),
    FieldPanel('caption
'),
    MultiFieldPanel(LinkFields.panels,  "Link"),
  ]



Clone # 1058
Distance between two fragments = 5
Clone size = 5
Source file "../tests/beets/mediafile.py"
The first line is 1308
Source file "../tests/beets/mediafile.py"
The first line is 1257
script  =  MediaField(
  MP3DescStorageStyle(u'Script'),
  MP4StorageStyle("----:com.apple.iTunes:SCRIPT"),
  StorageStyle('SCRIPT
'),
  ASFStorageStyle('WM/Script'),
)
albumtype  =  MediaField(
  MP3DescStorageStyle(u'MusicBrainz  Album  Type'),
  MP4StorageStyle('----:com.apple.iTunes:MusicBrainz  Album  Type'),
  StorageStyle('MUSI
CBRAINZ_ALBUMTYPE'),
  ASFStorageStyle('MusicBrainz/Album  Type'),
)



Clone # 1059
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 292
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 222
self.test_page  =  SimplePage() self.child_page  =  SimplePage()
self.test_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.test_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"
  self.section_a.add_child(self.test_page)
  self.root_page.add_child(self.child_page)
  login(self.client)
  login(self.client)



Clone # 1060
Distance between two fragments = 5
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 292
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
self.test_page  =  SimplePage() self.event_page  =  EventPage()
self.test_page.title  =  "Hello  world!" self.event_page.title  =  "Event  page"
self.test_page.slug  =  "hello-world" self.event_page.slug  =  "event-page"
  self.section_a.add_child(self.test_page)
  self.root_page.add_child(self.event_page)
  login(self.client)
  login(self.client)



Clone # 1061
Distance between two fragments = 2
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 292
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 25
self.test_page  =  SimplePage() self.child_page  =  SimplePage()
self.test_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.test_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"
  self.section_a.add_child(self.test_page)
  self.root_page.add_child(self.child_page)
  login(self.client)
  login(self.client)



Clone # 1062
Distance between two fragments = 4
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 222
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
self.child_page  =  SimplePage() self.event_page  =  EventPage()
self.child_page.title  =  "Hello  world!" self.event_page.title  =  "Event  page"
self.child_page.slug  =  "hello-world" self.event_page.slug  =  "event-page"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.event_page)
  login(self.client)
  login(self.client)



Clone # 1063
Distance between two fragments = 4
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 25
self.event_page  =  EventPage() self.child_page  =  SimplePage()
self.event_page.title  =  "Event  page" self.child_page.title  =  "Hello  world!"
self.event_page.slug  =  "event-page" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.event_page)
  self.root_page.add_child(self.child_page)
  login(self.client)
  login(self.client)



Clone # 1064
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 278
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 219
  self.root_page  =  Page.objects.get(id=2)
  self.root_page  =  Page.objects.get(id=2)
self.section_a  =  SimplePage() self.child_page  =  SimplePage()
self.section_a.title  =  "Section  A" self.child_page.title  =  "Hello  world!"
self.section_a.slug  =  "section-a" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_a)
  self.root_page.add_child(self.child_page)



Clone # 1065
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 278
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 22
  self.root_page  =  Page.objects.get(id=2)
  self.root_page  =  Page.objects.get(id=2)
self.section_a  =  SimplePage() self.child_page  =  SimplePage()
self.section_a.title  =  "Section  A" self.child_page.title  =  "Hello  world!"
self.section_a.slug  =  "section-a" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_a)
  self.root_page.add_child(self.child_page)



Clone # 1066
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 677
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 670
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
  if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  deleted,  even  by  superusers
    return  False
if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  edited,  even  by  superusers
  return  False



Clone # 1067
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 677
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 710
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
  if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  deleted,  even  by  superusers
    return  False
  if  self.page_is_root:
    return  False



Clone # 1068
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 677
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 749
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
  if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  deleted,  even  by  superusers
    return  False
  if  self.user.is_superuser:
    return  True



Clone # 1069
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 670
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 710
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  edited,  even  by  superusers
  return  False
  if  self.page_is_root:
    return  False



Clone # 1070
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 670
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 749
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
if  self.page_is_root:    #  root  node  is  not  a  page  and  can  never  be  edited,  even  by  superusers
  return  False
  if  self.user.is_superuser:
    return  True



Clone # 1071
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 710
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 749
if  not  self.user.is_active:
  return  False
if  not  self.user.is_active:
  return  False
  if  self.page_is_root:
    return  False
  if  self.user.is_superuser:
    return  True



Clone # 1072
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/plugins.py"
The first line is 49
Source file "../tests/beets/plugins.py"
The first line is 47
if  not  self.template_fields:
  self.template_fields  =  {}
if  not  self.template_funcs:
  self.template_funcs  =  {}
  if  not  self.album_template_fields:
    self.album_template_fields  =  {}
if  not  self.template_fields:
  self.template_fields  =  {}



Clone # 1073
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 54
  if  not  time_string:
    return  None
  if  not  time_string:
    return  None
expr  =  re.compile("^(?P<hour>\d+)(?:(?:.|:)(?P<minute>\d+))?") expr  =  re.compile("^(?P<hour>\d+)(?:(?:.|:)(?P<minute>\d+))?(?P<am_pm>am|pm)")
match  =  expr.match(time_string.lower()) match  =  expr.match(time_string.lower())



Clone # 1074
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 403
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 299
newobj.path  =  newpath newobj.path  =  newpath
  newobj.save()
newobj.save()
transaction.commit_unless_managed() transaction.commit_unless_managed()
  return  newobj

  return  newobj



Clone # 1075
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 403
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 168
newobj.path  =  newpath newobj.parent  =  self
  newobj.save()
newobj.save()
transaction.commit_unless_managed() transaction.commit_unless_managed()
  return  newobj

  return  newobj



Clone # 1076
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 299
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 168
newobj.path  =  newpath newobj.parent  =  self
newobj.save() newobj.save()
transaction.commit_unless_managed() transaction.commit_unless_managed()
  return  newobj

  return  newobj



Clone # 1077
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 23
Source file "../tests/beets/importer.py"
The first line is 234
self.socket_in  =  socket_in self.lib  =  lib
self.socket_out  =  socket_out self.logfile  =  logfile
self.socket_err  =  socket_err self.paths  =  paths
  self.raw  =  raw
  self.query  =  query



Clone # 1078
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 23
Source file "../tests/beets/mediafile.py"
The first line is 304
self.socket_in  =  socket_in self.key  =  key
self.socket_out  =  socket_out self.as_type  =  as_type
self.socket_err  =  socket_err self.suffix  =  suffix
  self.raw  =  raw
  self.float_places  =  float_places



Clone # 1079
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 234
Source file "../tests/beets/mediafile.py"
The first line is 304
self.lib  =  lib self.key  =  key
self.logfile  =  logfile self.as_type  =  as_type
self.paths  =  paths self.suffix  =  suffix
  self.query  =  query
  self.float_places  =  float_places



Clone # 1080
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 450
Source file "../tests/beets/importer.py"
The first line is 403
self.model_class  =  model_class self.cur_artist  =  cur_artist
self.rows  =  rows self.cur_album  =  cur_album
self.db  =  db self.candidates  =  candidates
  self.query  =  query
  self.rec  =  rec



Clone # 1081
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 450
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 8
self.model_class  =  model_class self.name  =  name
self.rows  =  rows self.label  =  label
self.db  =  db self.classnames  =  classnames
  self.query  =  query
  self.filter_spec  =  filter_spec



Clone # 1082
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 411
Source file "../tests/beets/importer.py"
The first line is 403
self.cur_artist  =  None self.cur_artist  =  cur_artist
self.cur_album  =  None self.cur_album  =  cur_album
self.candidates  =  None self.candidates  =  candidates
  self.rec  =  None
  self.rec  =  rec



Clone # 1083
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 403
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 8
self.cur_artist  =  cur_artist self.name  =  name
self.cur_album  =  cur_album self.label  =  label
self.candidates  =  candidates self.classnames  =  classnames
  self.rec  =  rec
  self.filter_spec  =  filter_spec



Clone # 1084
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 450
Source file "../tests/beets/importer.py"
The first line is 234
self.model_class  =  model_class self.lib  =  lib
self.rows  =  rows self.logfile  =  logfile
self.db  =  db self.paths  =  paths
  self.query  =  query
  self.query  =  query



Clone # 1085
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 450
Source file "../tests/beets/mediafile.py"
The first line is 304
self.model_class  =  model_class self.key  =  key
self.rows  =  rows self.as_type  =  as_type
self.db  =  db self.suffix  =  suffix
  self.query  =  query
  self.float_places  =  float_places



Clone # 1086
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 450
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 23
self.model_class  =  model_class self.socket_in  =  socket_in
self.rows  =  rows self.socket_out  =  socket_out
self.db  =  db self.socket_err  =  socket_err
  self.query  =  query
  self.raw  =  raw



Clone # 1087
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 403
Source file "../tests/beets/importer.py"
The first line is 234
self.cur_artist  =  cur_artist self.lib  =  lib
self.cur_album  =  cur_album self.logfile  =  logfile
self.candidates  =  candidates self.paths  =  paths
  self.rec  =  rec
  self.query  =  query



Clone # 1088
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 403
Source file "../tests/beets/mediafile.py"
The first line is 304
self.cur_artist  =  cur_artist self.key  =  key
self.cur_album  =  cur_album self.as_type  =  as_type
self.candidates  =  candidates self.suffix  =  suffix
  self.rec  =  rec
  self.float_places  =  float_places



Clone # 1089
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 403
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 23
self.cur_artist  =  cur_artist self.socket_in  =  socket_in
self.cur_album  =  cur_album self.socket_out  =  socket_out
self.candidates  =  candidates self.socket_err  =  socket_err
  self.rec  =  rec
  self.raw  =  raw



Clone # 1090
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 8
Source file "../tests/beets/importer.py"
The first line is 234
self.name  =  name self.lib  =  lib
self.label  =  label self.logfile  =  logfile
self.classnames  =  classnames self.paths  =  paths
  self.filter_spec  =  filter_spec
  self.query  =  query



Clone # 1091
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 8
Source file "../tests/beets/mediafile.py"
The first line is 304
self.name  =  name self.key  =  key
self.label  =  label self.as_type  =  as_type
self.classnames  =  classnames self.suffix  =  suffix
  self.filter_spec  =  filter_spec
  self.float_places  =  float_places



Clone # 1092
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 23
self.name  =  name self.socket_in  =  socket_in
self.label  =  label self.socket_out  =  socket_out
self.classnames  =  classnames self.socket_err  =  socket_err
  self.filter_spec  =  filter_spec
  self.raw  =  raw



Clone # 1093
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 20
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 37
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  orphans:
  print  "Orphaned  pages  found:  %r"  %  orphans
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth



Clone # 1094
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 20
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 35
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path
  if  bad_numchild:
    print  "Incorrect  numchilvalue  found  for  pages:  %r"  %  bad_numchild
if  orphans:
  print  "Orphanepages  found:  %r"  %  orphans



Clone # 1095
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 20
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 33
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  bad_alpha:
  print  "Invalid  characters  found  in  path  for  pages:  %r"  %  bad_alpha
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path



Clone # 1096
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 39
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 20
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild



Clone # 1097
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 39
Source file "../tests/wagtail/wagtail/wagtailcore/management/commands/fixtree.py"
The first line is 33
if  bad_depth:
  print  "Incorrect  depth  value  found  for  pages:  %r"  %  bad_depth
if  bad_alpha:
  print  "Invalid  characters  found  in  path  for  pages:  %r"  %  bad_alpha
  if  bad_numchild:
    print  "Incorrect  numchild  value  found  for  pages:  %r"  %  bad_numchild
if  bad_path:
  print  "Invalid  path  length  found  for  pages:  %r"  %  bad_path



Clone # 1098
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1361
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1112
  def  test_move_branch_left_itself_sibling(self,  model):
    target  =  model.objects.get(desc='4')
    model.objects.get(desc='4').move(target,  'left')
    assert  self.got(model)  ==  UNCHANGED
  def  test_move_leaf_left_sibling_itself(self,  model):
    target  =  model.objects.get(desc='231')
    model.objects.get(desc='231').move(target,  'left')
    assert  self.got(model)  ==  UNCHANGED



Clone # 1099
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 47
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 38
t.add(patharcname='.') t.addfile(dfinfodockerfile)
t.close() t.close()
f.seek(0) f.seek(0)
  return  f

  return  f



Clone # 1100
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/tests/service_test.py"
The first line is 92
Source file "../tests/fig/tests/service_test.py"
The first line is 67
service.kill() service.create_container()
self.assertEqual(len(service.containers()),  0) self.assertEqual(len(service.containers()),  0)
  self.assertEqual(len(service.containers(stopped=True)),  1)
  self.assertEqual(len(service.containers(stopped=True)),  1)
service.remove_stopped() service.start()



Clone # 1101
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/tests/service_test.py"
The first line is 69
Source file "../tests/fig/tests/service_test.py"
The first line is 65
  self.assertEqual(len(service.containers(stopped=True)),  1)
  self.assertEqual(len(service.containers(stopped=True)),  0)
service.start() service.create_container()
self.assertEqual(len(service.containers()),  1) self.assertEqual(len(service.containers()),  0)
  self.assertEqual(len(service.containers(stopped=True)),  1)
  self.assertEqual(len(service.containers(stopped=True)),  1)



Clone # 1102
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 43
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 62
  self.assertEqual(homepage.relative_url(default_site),  '/')
  self.assertEqual(homepage.relative_url(events_site),  'http://localhost/')
self.assertEqual(christmas_page.full_url,  'http://localhost/events/christmas/') self.assertEqual(christmas_page.full_url,  'http://events.example.com/christmas/')
self.assertEqual(christmas_page.url,  '/events/christmas/') self.assertEqual(christmas_page.url,  'http://events.example.com/christmas/')
  self.assertEqual(christmas_page.relative_url(default_site),  '/events/christmas/')
self.assertEqual(christmas_page.relative_url(default_site),  'http://events.example.com/christmas/')



Clone # 1103
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/tests/service_test.py"
The first line is 16
Source file "../tests/fig/tests/service_test.py"
The first line is 10
self.assertRaises(ConfigError,  lambda:  Service(name='_'))   self.assertRaises(ConfigError,  lambda:  Service(name=''))
self.assertRaises(ConfigError,  lambda:  Service(name='____')) self.assertRaises(ConfigError,  lambda:  Service(name='  '))
self.assertRaises(ConfigError,  lambda:  Service(name='foo_bar')) self.assertRaises(ConfigError,  lambda:  Service(name='/'))
  self.assertRaises(ConfigError,  lambda:  Service(name='__foo_bar__'))
self.assertRaises(ConfigError,  lambda:  Service(name='!'))



Clone # 1104
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 64
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 59
self.assertEqual(christmas_page.full_url,  'http://events.example.com/christmas/') self.assertEqual(homepage.full_url,  'http://localhost/')
self.assertEqual(christmas_page.url,  'http://events.example.com/christmas/') self.assertEqual(homepage.url,  'http://localhost/')
self.assertEqual(christmas_page.relative_url(default_site),  'http://events.example.com/christmas/') self.assertEqual(homepage.relative_url(default_site),  '/')
  self.assertEqual(christmas_page.relative_url(events_site),  '/christmas/')
  self.assertEqual(homepage.relative_url(events_site),  'http://localhost/')



Clone # 1105
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 27
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )



Clone # 1106
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 74
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )



Clone # 1107
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 27
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 74
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )
  def  setUp(self):
    #  Create  an  image  for  running  tests  on
    self.image  =  Image.objects.create(
      title="Test  image",
      file=get_test_image_file(),
    )



Clone # 1108
Distance between two fragments = 0
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 963
Source file "../tests/beets/importer.py"
The first line is 649
task  =  yield  task task  =  yield  task
  if  task.should_skip():
    continue
  if  task.should_skip():
    continue
  plugins.send('import_task_start',  session=session,  task=task)
  plugins.send('import_task_start',  session=session,  task=task)



Clone # 1109
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/tests/service_test.py"
The first line is 86
Source file "../tests/fig/tests/service_test.py"
The first line is 89
service.start_container() service.remove_stopped()
  self.assertEqual(len(service.containers()),  1)
  self.assertEqual(len(service.containers()),  1)
service.remove_stopped() service.kill()
  self.assertEqual(len(service.containers()),  1)
self.assertEqual(len(service.containers()),  0)



Clone # 1110
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 59
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 44
  redirect.save()
  redirect.save()
  r  =  c.get('/redirectme/')
  r  =  c.get('/redirectme/')
self.assertEqual(r.status_code,  302) self.assertEqual(r.status_code,  301)
  self.assertTrue(r.has_header('Location'))

  self.assertTrue(r.has_header('Location'))



Clone # 1111
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 1247
Source file "../tests/beets/ui/commands.py"
The first line is 1063
def  write_func(lib,  opts,  args):
  write_items(lib,  decargs(args),  opts.pretend)
def  stats_func(lib,  opts,  args):
  show_stats(lib,  decargs(args),  opts.exact)
write_cmd.func  =  write_func stats_cmd.func  =  stats_func
default_commands.append(write_cmd)
 
 
default_commands.append(stats_cmd)
 
 



Clone # 1112
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 178
Source file "../tests/beets/importer.py"
The first line is 304
  def  add(self,  value):
    """Set  the  *default*  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  lowest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  resolve_duplicate(self,  task):
    raise  NotImplementedError
  def  set(self,  value):
    """*Override*  the  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  highest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  choose_item(self,  task):
    raise  NotImplementedError



Clone # 1113
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 178
Source file "../tests/beets/importer.py"
The first line is 301
  def  add(self,  value):
    """Set  the  *default*  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  lowest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  choose_match(self,  task):
    raise  NotImplementedError
  def  set(self,  value):
    """*Override*  the  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  highest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  resolve_duplicate(self,  task):
    raise  NotImplementedError



Clone # 1114
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 178
Source file "../tests/beets/importer.py"
The first line is 298
  def  add(self,  value):
    """Set  the  *default*  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  lowest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  should_resume(self,  path):
    raise  NotImplementedError
  def  set(self,  value):
    """*Override*  the  value  for  this  configuration  view.  The
    specified  value  is  added  as  the  highest-priority  configuration
    data  source.
    """

    raise  NotImplementedError
  def  choose_match(self,  task):
    raise  NotImplementedError



Clone # 1115
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/base.py"
The first line is 34
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/base.py"
The first line is 31
  def  add_bulk(self,  obj_list):
    return  NotImplemented
  def  add(self,  obj):
    return  NotImplemented
  def  delete(self,  obj):
    return  NotImplemented
  def  add_bulk(self,  obj_list):
    return  NotImplemented



Clone # 1116
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 23
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 20
  def  add_bulk(self,  obj_list):
    pass  #  Not  needed
  def  add(self,  obj):
    pass  #  Not  needed
  def  delete(self,  obj):
    pass  #  Not  needed
  def  add_bulk(self,  obj_list):
    pass  #  Not  needed



Clone # 1117
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 304
Source file "../tests/beets/importer.py"
The first line is 298
  def  resolve_duplicate(self,  task):
    raise  NotImplementedError
  def  should_resume(self,  path):
    raise  NotImplementedError
  def  choose_item(self,  task):
    raise  NotImplementedError
  def  choose_match(self,  task):
    raise  NotImplementedError



Clone # 1118
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 14
Source file "../tests/beets/plugins.py"
The first line is 89
  def  add_type(self,  model):
    pass  #  Not  needed
  def  configure(self,  config):
    """This 
method  is  called  with  the  ConfigParser  object  after
    the  CLI  starts  up.
    """

    pass
  def  refresh_index(self):
    pass  #  Not  needed
  def  item_fields(self):
    """Returns  field  descriptors  to  be  added  to  the  MediaFile  class,
    in  the  form  of  a  dictionary  whose  keys  are  field  names  and  whose
    values  are  descriptor  (e.g.,  MediaField)  instances.  The  Library
    database  schema  is  not  (currently)  extended.
    """
    return  {}



Clone # 1119
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 112
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 146
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)



Clone # 1120
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 93
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 146
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)



Clone # 1121
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 81
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 146
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)
parent  =  models.ForeignKey('self',
  related_name='children_set',
  null=True,
  db_index=True)



Clone # 1122
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/hooks.py"
The first line is 494
Source file "../tests/beets/autotag/hooks.py"
The first line is 488
def  tracks_for_id(track_id):
    """Get  a  list  of  tracks  for  an  ID."""
    candidates  =  [track_for_mbid(track_id)]
    candidates.extend(plugins.track_for_id(track_id))
    return  filter(None,  candidates)
 
def  albums_for_id(album_id):
    """Get  a  list  of  albums  for  an  ID."""
    candidates  =  [album_for_mbid(album_id)]
    candidates.extend(plugins.album_for_id(album_id))
    return  filter(None,  candidates)
 



Clone # 1123
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 42
orm['wagtailcore.grouppagepermission'].objects.create(
  group=editors_group,  page=root,  permission_type='add')
orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='add')
  orm['wagtailcore.grouppagepermission'].objects.create(
    group=editors_group,  page=root,  permission_type='edit')

orm['wagtailcore.grouppagepermission'].objects.create(
  group=moderators_group,  page=root,  permission_type='edit')



Clone # 1124
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 26
Source file "../tests/beets/importer.py"
The first line is 28
from  beets  import  autotag from  beets  import  dbcore
from  beets  import  library from  beets  import  plugins
from  beets  import  dbcore from  beets  import  util
from  beets  import  plugins from  beets  import  config



Clone # 1125
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 27
Source file "../tests/beets/library.py"
The first line is 25
from  beets  import  library from  unidecode  import  unidecode
from  beets  import  dbcore from  beets.mediafile  import  MediaFile
from  beets  import  plugins from  beets  import  plugins
from  beets  import  util from  beets  import  util



Clone # 1126
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 3
from  django.contrib  import  messages from  django.shortcuts  import  get_object_or_404,  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1127
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 3
from  django.contrib  import  messages from  django.shortcuts  import  get_object_or_404,  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1128
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib.auth  import  get_user_model from  django.contrib.auth.decorators  import  permission_required
from  django.contrib.auth.decorators  import  permission_required from  django.contrib  import  messages
 
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger



Clone # 1129
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 2
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib  import  messages
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.exceptions  import  PermissionDenied from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext    as  _
 



Clone # 1130
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib.auth.decorators  import  permission_required
from  django.contrib.auth.decorators  import  permission_required from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger



Clone # 1131
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 2
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib  import  messages
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
from  django.core.exceptions  import  PermissionDenied from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext    as  _
 



Clone # 1132
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 1
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.shortcuts  import  render,  redirect,  get_object_or_404
from  django.contrib  import  messages from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.contrib.auth.decorators  import  permission_required
from  django.contrib.auth.decorators  import  permission_required from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger



Clone # 1133
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 3
from  django.contrib  import  messages from  django.shortcuts  import  get_object_or_404,  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1134
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 3
from  django.contrib  import  messages from  django.shortcuts  import  get_object_or_404,  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1135
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailusers/views/users.py"
The first line is 4
from  django.contrib.auth.decorators  import  permission_required from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib  import  messages
 
from  django.contrib  import  messages
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.db.models  import  Q
from  django.utils.translation  import  ugettext  as  _
 
from  django.utils.translation  import  ugettext  as  _
 



Clone # 1136
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 33
Source file "../tests/beets/library.py"
The first line is 26
from  beets  import  library from  beets.mediafile  import  MediaFile
from  beets  import  plugins from  beets  import  plugins
from  beets  import  util from  beets  import  util
from  beets.util.functemplate  import  Template from  beets.util  import  bytestring_path,  syspath,  normpath,  samefile



Clone # 1137
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 2
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.contrib.auth.decorators  import  permission_required
from  django.contrib  import  messages from  django.contrib  import  messages
 
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.utils.translation  import  ugettext  as  _
 



Clone # 1138
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 2
from  django.shortcuts  import  render,  redirect,  get_object_or_404 from  django.contrib.auth.decorators  import  permission_required
from  django.contrib  import  messages from  django.contrib  import  messages
 
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.utils.translation  import  ugettext  as  _
 



Clone # 1139
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/documents.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 1
from  django.contrib  import  messages from  django.shortcuts  import  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1140
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/images.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 1
from  django.contrib  import  messages from  django.shortcuts  import  render
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required from  django.contrib.auth.decorators  import  permission_required
 
from  django.core.exceptions  import  PermissionDenied from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow



Clone # 1141
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/forms.py"
The first line is 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/admin_tree.py"
The first line is 18
from  django.forms.models  import  BaseModelForm,  ErrorList,  model_to_dict from  django.template  import  Library
from  django.forms.models  import  modelform_factory  as  django_modelform_factory from  django.utils.html  import  conditional_escape
from  django.utils.safestring  import  mark_safe from  django.utils.safestring  import  mark_safe
from  django.utils.translation  import  ugettext_lazy  as  _
 
from  django.utils.translation  import  ugettext_lazy  as  _
 
 



Clone # 1142
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 29
Source file "../tests/beets/autotag/match.py"
The first line is 23
from  beets  import  plugins from  munkres  import  Munkres
 
from  beets  import  util from  beets  import  plugins
from  beets  import  config from  beets  import  config
from  beets.util  import  pipeline from  beets.util  import  plurality



Clone # 1143
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 26
Source file "../tests/beets/autotag/match.py"
The first line is 23
from  beets.mediafile  import  MediaFile from  munkres  import  Munkres
 
from  beets  import  plugins from  beets  import  plugins
from  beets  import  util from  beets  import  config
from  beets.util  import  bytestring_path,  syspath,  normpath,  samefile from  beets.util  import  plurality



Clone # 1144
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 31
Source file "../tests/beets/autotag/match.py"
The first line is 25
from  beets  import  config from  beets  import  plugins
from  beets.util  import  pipeline from  beets  import  config
from  beets.util  import  syspath,  normpath,  displayable_path from  beets.util  import  plurality
from  beets.util.enumeration  import  enum from  beets.util.enumeration  import  enum



Clone # 1145
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 4
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext    as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.edit_handlers  import  ObjectList
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 



Clone # 1146
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 4
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext    as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.edit_handlers  import  ObjectList
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 



Clone # 1147
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/admin_tree.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/elasticsearch.py"
The first line is 1
from  django.db  import  models from  django.db  import  models
from  django.conf  import  settings from  django.conf  import  settings
 
from  django.contrib.admin.templatetags.admin_list  import  ( from  elasticutils  import  get_es,  S
 
from  django.contrib.admin.util  import  lookup_field,  display_for_field from  wagtail.wagtailsearch.backends.base  import  BaseSearch



Clone # 1148
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailredirects/views.py"
The first line is 4
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext    as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.edit_handlers  import  ObjectList
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 



Clone # 1149
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 11
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 4
from  django.db.models  import  FQ from  django.db  import  connectionmodels,  transaction
from  django.utils.translation  import  ugettext_noop  as  _
 
from  django.utils.translation  import  ugettext_noop  as  _
 
from  treebeard.numconv  import  NumConv from  treebeard.exceptions  import  InvalidMoveToDescendant
from  treebeard.models  import  Node from  treebeard.models  import  Node
 
 



Clone # 1150
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 9
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 3
from  django.core  import  serializers from  django.core  import  serializers
from  django.db  import  connection,  models,  transaction from  django.db  import  connection,  models,  transaction
from  django.db.models  import  Q from  django.utils.translation  import  ugettext_noop  as  _
 
from  django.utils.translation  import  ugettext_noop  as  _
 
from  treebeard.exceptions  import  InvalidMoveToDescendant



Clone # 1151
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 5
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailsearch  import  models,  forms
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
 



Clone # 1152
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 5
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailsearch  import  models,  forms
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
 



Clone # 1153
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/views/editorspicks.py"
The first line is 5
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
from  django.utils.translation  import  ugettext  as  _
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailsearch  import  models,  forms
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
 



Clone # 1154
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/tests/testcases.py"
The first line is 1
Source file "../tests/fig/tests/service_test.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
from  fig.packages.docker  import  Client from  fig  import  Service
from  fig.service  import  Service from  fig.service  import  CannotBeScaledError,  ConfigError



Clone # 1155
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 30
Source file "../tests/beets/autotag/hooks.py"
The first line is 20
from  beets  import  util from  beets  import  plugins
from  beets  import  config from  beets  import  config
from  beets.util  import  pipeline from  beets.autotag  import  mb
from  beets.util  import  syspath,  normpath,  displayable_path from  beets.util  import  levenshtein



Clone # 1156
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 29
Source file "../tests/beets/autotag/hooks.py"
The first line is 20
from  beets  import  plugins from  beets  import  plugins
from  beets  import  util from  beets  import  config
from  beets  import  config from  beets.autotag  import  mb
from  beets.util  import  pipeline from  beets.util  import  levenshtein



Clone # 1157
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/admin_tree.py"
The first line is 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/__init__.py"
The first line is 5
from  django.core.exceptions  import  ObjectDoesNotExist from  django.utils  import  formats,  timezonesix
from  django.template  import  Library from  django.utils.encoding  import  smart_text
from  django.utils.html  import  conditional_escape from  django.utils.html  import  conditional_escape
from  django.utils.safestring  import  mark_safe from  django.utils.safestring  import  mark_safe
 



Clone # 1158
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/match.py"
The first line is 25
Source file "../tests/beets/autotag/hooks.py"
The first line is 20
from  beets  import  plugins from  beets  import  plugins
from  beets  import  config from  beets  import  config
from  beets.util  import  plurality from  beets.autotag  import  mb
from  beets.util.enumeration  import  enum from  beets.util  import  levenshtein



Clone # 1159
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/tests/testcases.py"
The first line is 1
Source file "../tests/fig/fig/cli/command.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
from  fig.packages.docker  import  Client from  ..packages.docker  import  Client
from  fig.service  import  Service from  requests.exceptions  import  ConnectionError



Clone # 1160
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1161
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1162
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1163
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1164
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1165
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1166
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1167
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1168
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1169
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1170
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1171
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1172
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1173
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1174
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1175
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1176
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1177
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1178
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1179
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1180
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 2
from  django.test  import  TestCase from  wagtail.wagtaildocs  import  models
from  django  import  template from  wagtail.tests.utils  import  login
from  django.contrib.auth.models  import  User,  Group,  Permission from  django.contrib.auth.models  import  User,  Group,  Permission
from  django.core.urlresolvers  import  reverse from  django.core.urlresolvers  import  reverse
 



Clone # 1181
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailembeds/tests.py"
The first line is 1
from  django.test  import  TestCase from  django.test  import  TestCase
from  wagtail.wagtaildocs  import  models from  django.test.client  import  Client
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
from  django.contrib.auth.models  import  User,  Group,  Permission from  wagtail.wagtailembeds  import  get_embed
 
 



Clone # 1182
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailembeds/tests.py"
The first line is 1
from  django.test  import  TestCase from  django.test  import  TestCase
from  django.test.client  import  Client from  django.test.client  import  Client
from  wagtail.wagtailredirects  import  models from  wagtail.tests.utils  import  login
from  wagtail.tests.utils  import  login from  wagtail.wagtailembeds  import  get_embed
 
 



Clone # 1183
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 3
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 1
from  django.contrib.auth.models  import  User,  Group,  Permission from  django.test  import  TestCase
from  django.core.urlresolvers  import  reverse from  django.core.urlresolvers  import  reverse
from  django.core.files.uploadedfile  import  SimpleUploadedFile
 
from  django.contrib.auth.models  import  User
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
 
 



Clone # 1184
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 1
from  django.test  import  TestCase from  django.test  import  TestCase
from  django.core  import  management from  django.core.urlresolvers  import  reverse
from  wagtail.wagtailsearch  import  models from  django.contrib.auth.models  import  User
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
 
 



Clone # 1185
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 1
from  django.test  import  TestCase from  django.test  import  TestCase
from  django.test.client  import  Client from  django.core.urlresolvers  import  reverse
from  wagtail.wagtailredirects  import  models from  django.contrib.auth.models  import  User
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
 
 



Clone # 1186
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/chooser.py"
The first line is 3
from  django.utils.http  import  urlencode from  django.shortcuts  import  get_object_or_404
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
 
from  wagtail.wagtailadmin.forms  import  SearchFormExternalLinkChooserForm,  ExternalLinkChooserWithLinkTextForm,  EmailLinkChooserForm,  EmailLinkChooserWithLinkTextForm
 
from  wagtail.wagtailsnippets.views.snippets  import  get_content_type_from_url_paramsget_snippet_type_name
 
 



Clone # 1187
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/chooser.py"
The first line is 3
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.shortcuts  import  get_object_or_404
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailsnippets.views.snippets  import  get_content_type_from_url_params,  get_snippet_type_name
 
 



Clone # 1188
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/chooser.py"
The first line is 3
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.shortcuts  import  get_object_or_404
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailsnippets.views.snippets  import  get_content_type_from_url_params,  get_snippet_type_name
 
 



Clone # 1189
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/queries.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/chooser.py"
The first line is 3
from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger from  django.shortcuts  import  get_object_or_404
from  django.contrib.auth.decorators  import  permission_required
 
from  django.contrib.auth.decorators  import  permission_required
 
from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow from  wagtail.wagtailadmin.modal_workflow  import  render_modal_workflow
 
from  wagtail.wagtailadmin.forms  import  SearchForm
 
from  wagtail.wagtailsnippets.views.snippets  import  get_content_type_from_url_params,  get_snippet_type_name
 
 



Clone # 1190
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/admin_tree.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailsearch/signal_handlers.py"
The first line is 2
from  django.db  import  models from  django.db  import  models
from  django.conf  import  settings from  django.conf  import  settings
 
from  django.contrib.admin.templatetags.admin_list  import  ( from  wagtail.wagtailsearch.indexed  import  Indexed
from  django.contrib.admin.util  import  lookup_field,  display_for_field from  wagtail.wagtailsearch.backends  import  get_search_backend
 
 



Clone # 1191
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/elasticsearch.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailsearch/signal_handlers.py"
The first line is 2
from  django.db  import  models from  django.db  import  models
from  django.conf  import  settings
 
from  django.conf  import  settings
 
from  elasticutils  import  get_es,  S
 
from  wagtail.wagtailsearch.indexed  import  Indexed
from  wagtail.wagtailsearch.backends.base  import  BaseSearch from  wagtail.wagtailsearch.backends  import  get_search_backend
 
 



Clone # 1192
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1193
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1194
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1195
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  DataMigration from  south.v2  import  SchemaMigration
from  django.db  import  models,  connection from  django.db  import  models
 
 



Clone # 1196
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1197
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1198
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1199
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1200
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1201
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1202
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1203
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1204
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1205
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/forms.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 1
from  django  import  forms from  django  import  forms
from  django.contrib.auth  import  get_user_model from  django.contrib.auth.models  import  User
from  django.contrib.auth.forms  import  AuthenticationForm,  PasswordResetForm from  django.contrib.auth.forms  import  UserCreationForm  as  BaseUserCreationForm
from  django.utils.translation  import  ugettext  as  _,  ugettext_lazy  as  __
 
from  django.utils.translation  import  ugettext_lazy  as  _
 
 



Clone # 1206
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1207
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1208
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1209
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1210
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0001_initial.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1211
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0002_auto__add_field_searchtest_live.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailembeds/migrations/0001_initial.py"
The first line is 2
from  south.utils  import  datetime_utils  as  datetime from  south.utils  import  datetime_utils  as  datetime
from  south.db  import  db from  south.db  import  db
from  south.v2  import  SchemaMigration from  south.v2  import  SchemaMigration
from  django.db  import  models
 
 
from  django.db  import  models
 
 



Clone # 1212
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 2
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 3
from  wagtail.wagtaildocs  import  models from  wagtail.tests.models  import  SimplePage,  EventPage
from  wagtail.tests.utils  import  login from  wagtail.tests.utils  import  login
from  django.contrib.auth.models  import  User,  Group,  Permission from  wagtail.wagtailcore.models  import  Page
from  django.core.urlresolvers  import  reverse
 
from  django.core.urlresolvers  import  reverse
 
 



Clone # 1213
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailembeds/forms.py"
The first line is 1
from  django  import  forms from  django  import  forms
from  django.contrib.auth.models  import  User from  django.core.validators  import  URLValidator
from  django.contrib.auth.forms  import  UserCreationForm  as  BaseUserCreationForm from  django.core.exceptions  import  ValidationError
from  django.utils.translation  import  ugettext_lazy  as  _
 
 
from  django.utils.translation  import  ugettext_lazy  as  _
 



Clone # 1214
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/fig/fig/service.py"
The first line is 4
import  errno import  logging
import  logging import  re
import  os import  os
import  re import  sys



Clone # 1215
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/templatetags/rich_text.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailadmin/templatetags/wagtailuserbar.py"
The first line is 1
from  django  import  template from  django  import  template
from  django.utils.safestring  import  mark_safe
 
from  django.contrib.staticfiles.storage  import  staticfiles_storage
from  wagtail.wagtailcore.rich_text  import  expand_db_html
 
from  django.utils.html  import  format_html,  format_html_join
 
register  =  template.Library()
 
 
register  =  template.Library()
 
 



Clone # 1216
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/templatetags/rich_text.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailembeds/templatetags/embed_filters.py"
The first line is 1
from  django  import  template from  django  import  template
from  django.utils.safestring  import  mark_safe
 
from  django.utils.safestring  import  mark_safe
 
from  wagtail.wagtailcore.rich_text  import  expand_db_html
 
from  wagtail.wagtailembeds  import  get_embed
 
 
register  =  template.Library()
 
 
register  =  template.Library()
 
 



Clone # 1217
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/templatetags/wagtailuserbar.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailembeds/templatetags/embed_filters.py"
The first line is 1
from  django  import  template from  django  import  template
from  django.contrib.staticfiles.storage  import  staticfiles_storage from  django.utils.safestring  import  mark_safe
 
from  django.utils.html  import  format_html,  format_html_join
 
from  wagtail.wagtailembeds  import  get_embed
 
 
register  =  template.Library()
 
 
register  =  template.Library()
 
 



Clone # 1218
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/project.py"
The first line is 1
Source file "../tests/fig/fig/cli/docopt_command.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
import  logging import  sys
 
from  .service  import  Service
 
from  inspect  import  getdoc



Clone # 1219
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/project.py"
The first line is 1
Source file "../tests/fig/fig/cli/log_printer.py"
The first line is 1
from  __future__  import  unicode_literals from  __future__  import  unicode_literals
from  __future__  import  absolute_import from  __future__  import  absolute_import
import  logging import  sys
 
from  .service  import  Service
 
from  itertools  import  cycle
 



Clone # 1220
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  logging import  errno
import  sys import  logging
import  re import  os
import  signal
 
import  re



Clone # 1221
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/service.py"
The first line is 4
import  logging import  logging
import  sys import  re
import  re import  os
import  signal
 
import  sys



Clone # 1222
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 2
Source file "../tests/fig/fig/cli/formatter.py"
The first line is 1
from  __future__  import  absolute_import from  __future__  import  unicode_literals
from  __future__  import  division from  __future__  import  absolute_import
import  datetime import  os
import  os import  texttable
 
 



Clone # 1223
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 1
Source file "../tests/fig/fig/cli/formatter.py"
The first line is 1
from  __future__  import  print_function from  __future__  import  unicode_literals
from  __future__  import  unicode_literals from  __future__  import  absolute_import
import  logging import  os
import  sys import  texttable
 
 



Clone # 1224
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/importer.py"
The first line is 20
import  threading import  os
import  sqlite3 import  logging
import  contextlib
 
import  pickle
import  beets import  itertools



Clone # 1225
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/service.py"
The first line is 4
import  locale import  logging
import  optparse import  re
import  textwrap import  os
import  sys import  sys



Clone # 1226
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  locale import  threading
import  optparse import  sqlite3
import  textwrap import  contextlib
 
import  sys import  beets



Clone # 1227
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  logging import  threading
import  re import  sqlite3
import  os import  contextlib
 
import  sys import  beets



Clone # 1228
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/importer.py"
The first line is 20
import  logging import  os
import  re import  logging
import  os import  pickle
import  sys import  itertools



Clone # 1229
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/util/functemplate.py"
The first line is 30
import  logging import  re
import  sqlite3 import  ast
import  errno import  dis
import  re import  types
 



Clone # 1230
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/util/functemplate.py"
The first line is 30
import  errno import  re
import  logging import  ast
import  os import  dis
import  re import  types
 



Clone # 1231
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  os import  threading
import  sys import  sqlite3
import  re import  contextlib
 
import  shutil import  beets



Clone # 1232
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/fig/fig/service.py"
The first line is 4
import  os import  logging
import  sys import  re
import  re import  os
import  shutil import  sys



Clone # 1233
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  platform import  threading
import  os import  sqlite3
import  pkgutil import  contextlib
 
import  sys import  beets



Clone # 1234
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/service.py"
The first line is 4
import  platform import  logging
import  os import  re
import  pkgutil import  os
import  sys import  sys



Clone # 1235
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/ui/__init__.py"
The first line is 21
import  logging import  locale
import  sqlite3 import  optparse
import  errno import  textwrap
import  re import  sys



Clone # 1236
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/importer.py"
The first line is 20
import  logging import  os
import  sqlite3 import  logging
import  errno import  pickle
import  re import  itertools



Clone # 1237
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/fig/fig/service.py"
The first line is 4
import  logging import  logging
import  sqlite3 import  re
import  errno import  os
import  re import  sys



Clone # 1238
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  logging import  threading
import  os import  sqlite3
import  time import  contextlib
 
import  itertools import  beets



Clone # 1239
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/service.py"
The first line is 4
import  logging import  logging
import  os import  re
import  time import  os
import  itertools import  sys



Clone # 1240
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  errno import  threading
import  logging import  sqlite3
import  os import  contextlib
 
import  re import  beets



Clone # 1241
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/ui/__init__.py"
The first line is 21
import  errno import  locale
import  logging import  optparse
import  os import  textwrap
import  re import  sys



Clone # 1242
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  datetime import  threading
import  os import  sqlite3
import  socket import  contextlib
 
import  subprocess import  beets



Clone # 1243
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  sys import  threading
import  tty import  sqlite3
import  fcntl import  contextlib
 
import  os import  beets



Clone # 1244
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/service.py"
The first line is 4
import  sys import  logging
import  tty import  re
import  fcntl import  os
import  os import  sys



Clone # 1245
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  re import  threading
import  ast import  sqlite3
import  dis import  contextlib
 
import  types
 
import  beets



Clone # 1246
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/service.py"
The first line is 4
import  re import  logging
import  ast import  re
import  dis import  os
import  types
 
import  sys



Clone # 1247
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  logging import  threading
import  sys import  sqlite3
import  re import  contextlib
 
import  signal
 
import  beets



Clone # 1248
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/fig/setup.py"
The first line is 5
from  __future__  import  unicode_literals from  setuptools  import  setup,  find_packages
import  platform import  re
import  os import  os
import  pkgutil import  codecs
 
 



Clone # 1249
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 28
Source file "../tests/fig/setup.py"
The first line is 5
from  __future__  import  print_function
 
from  setuptools  import  setup,  find_packages
import  re import  re
import  ast import  os
import  dis import  codecs
 
 



Clone # 1250
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/fig/setup.py"
The first line is 5
from  __future__  import  print_function
 
from  setuptools  import  setup,  find_packages
import  logging import  re
import  os import  os
import  time import  codecs
 
 



Clone # 1251
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  unicode_literals from  __future__  import  division
 
import  logging import  datetime
import  sys import  logging
import  re import  re



Clone # 1252
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 2
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  unicode_literals from  __future__  import  with_statement,  unicode_literals
import  logging import  datetime
import  sys import  os
import  re import  sys
 



Clone # 1253
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  division
 
from  __future__  import  division
 
import  os import  datetime
import  sys import  logging
import  re import  re



Clone # 1254
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 16
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  division
 
from  __future__  import  with_statement,  unicode_literals
import  os import  datetime
import  sys import  os
import  re import  sys
 



Clone # 1255
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  unicode_literals from  __future__  import  division
 
import  platform import  datetime
import  os import  logging
import  pkgutil import  re



Clone # 1256
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 17
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  unicode_literals from  __future__  import  with_statement,  unicode_literals
import  platform import  datetime
import  os import  os
import  pkgutil import  sys
 



Clone # 1257
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 28
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  division
 
import  re import  datetime
import  ast import  logging
import  dis import  re



Clone # 1258
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 28
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  print_function
 
from  __future__  import  with_statementunicode_literals
import  re import  datetime
import  ast import  os
import  dis import  sys
 



Clone # 1259
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 19
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  division
 
import  locale import  datetime
import  optparse import  logging
import  textwrap import  re



Clone # 1260
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 19
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  print_function
 
from  __future__  import  with_statementunicode_literals
import  locale import  datetime
import  optparse import  os
import  textwrap import  sys
 



Clone # 1261
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  division
 
import  logging import  datetime
import  os import  logging
import  time import  re



Clone # 1262
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 18
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  print_function
 
from  __future__  import  with_statementunicode_literals
import  logging import  datetime
import  os import  os
import  time import  sys
 



Clone # 1263
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 18
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  print_function
 
from  __future__  import  division
 
import  os import  datetime
import  logging import  logging
import  pickle import  re



Clone # 1264
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 18
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  print_function
 
from  __future__  import  with_statementunicode_literals
import  os import  datetime
import  logging import  os
import  pickle import  sys
 



Clone # 1265
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 4
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  requests.exceptions  import  ConnectionError from  __future__  import  division
 
import  errno import  datetime
import  logging import  logging
import  os import  re



Clone # 1266
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  division from  __future__  import  division
 
import  datetime import  datetime
import  os import  logging
import  socket import  re



Clone # 1267
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 3
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  division from  __future__  import  with_statement,  unicode_literals
import  datetime import  datetime
import  os import  os
import  socket import  sys
 



Clone # 1268
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/beets/autotag/match.py"
The first line is 18
from  __future__  import  print_function from  __future__  import  division
 
import  sys import  datetime
import  tty import  logging
import  fcntl import  re



Clone # 1269
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 1
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  __future__  import  print_function from  __future__  import  with_statementunicode_literals
import  sys import  datetime
import  tty import  os
import  fcntl import  sys
 



Clone # 1270
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/setup.py"
The first line is 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 4
from  setuptools  import  setupfind_packages from  __future__  import  with_statementunicode_literals
import  re import  datetime
import  os import  os
import  codecs
 
 
import  sys
 



Clone # 1271
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 29
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 44
try:
  content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
except  ContentType.DoesNotExist:
  raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(app_name,  model_name)
except  ContentType.DoesNotExist:
  raise  Http404



Clone # 1272
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 357
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 44
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(app_name,  model_name)
except  ContentType.DoesNotExist:
  raise  Http404



Clone # 1273
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 140
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 44
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(app_name,  model_name)
except  ContentType.DoesNotExist:
  raise  Http404



Clone # 1274
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 116
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 44
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(app_name,  model_name)
except  ContentType.DoesNotExist:
  raise  Http404



Clone # 1275
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/pages.py"
The first line is 84
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 44
  try:
    content_type  =  ContentType.objects.get_by_natural_key(content_type_app_name,  content_type_model_name)
  except  ContentType.DoesNotExist:
    raise  Http404
try:
  content_type  =  ContentType.objects.get_by_natural_key(app_name,  model_name)
except  ContentType.DoesNotExist:
  raise  Http404



Clone # 1276
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 503
Source file "../tests/beets/dbcore/query.py"
The first line is 49
  def  __init__(self,  conn,  data,  sendall=False):
    self.conn  =  conn
    self.data  =  data
    self.sendall  =  sendall
  def  __init__(self,  field,  pattern,  fast=True):
    self.field  =  field
    self.patter
n  =  pattern
    self.fast  =  fast



Clone # 1277
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/container.py"
The first line is 9
Source file "../tests/beets/dbcore/query.py"
The first line is 49
  def  __init__(self,  clientdictionaryhas_been_inspected=False):
    self.client  =  client
    self.dictionary  =  dictionary
    self.has_been_inspected  =  has_been_inspected
  def  __init__(self,  fieldpatternfast=True):
    self.field  =  field
    self.pattern  =  pattern
    self.fast  =  fast



Clone # 1278
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/container.py"
The first line is 9
Source file "../tests/beets/util/bluelet.py"
The first line is 503
  def  __init__(self,  client,  dictionaryhas_been_inspected=False):
    self.client  =  client
    self.dictionary  =  dictionary
    self.has_been_inspected  =  has_been_inspected
  def  __init__(self,  conn,  datasendall=False):
    self.conn  =  conn
    self.data  =  data
    self.sendall  =  sendall



Clone # 1279
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 219
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 222
  if  widgets  is  not  None:
    attrs['widgets']  =  widgets
  if  formsets  is  not  None:
    attrs['formsets']  =  formsets
  if  formsets  is  not  None:
    attrs['formsets']  =  formsets
  if  exclude_formsets  is  not  None:
    attrs['exclude_formsets']  =  exclude_formsets



Clone # 1280
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 219
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 211
  if  widgets  is  not  None:
    attrs['widgets']  =  widgets
  if  fields  is  not  None:
    attrs['fields']  =  fields
  if  formsets  is  not  None:
    attrs['formsets']  =  formsets
if  exclude  is  not  None:
  attrs['exclude']  =  exclude



Clone # 1281
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 222
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 211
  if  formsets  is  not  None:
    attrs['formsets']  =  formsets
  if  fields  is  not  None:
    attrs['fields']  =  fields
  if  exclude_formsets  is  not  None:
    attrs['exclude_formsets']  =  exclude_formsets
if  exclude  is  not  None:
  attrs['exclude']  =  exclude



Clone # 1282
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 191
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 89
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()



Clone # 1283
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 149
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 89
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()



Clone # 1284
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 108
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 89
content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name) content_type  =  get_content_type_from_url_params(content_type_app_name,  content_type_model_name)
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
  if  not  user_can_edit_snippet_type(request.user,  content_type):
    raise  PermissionDenied
model  =  content_type.model_class() model  =  content_type.model_class()



Clone # 1285
Distance between two fragments = 1
Clone size = 4
Source file "../tests/fig/tests/service_test.py"
The first line is 258
Source file "../tests/fig/tests/service_test.py"
The first line is 254
service.scale(1) service.scale(1)
self.assertEqual(len(service.containers()),  1) self.assertEqual(len(service.containers()),  1)
service.scale(0) service.scale(3)
  self.assertEqual(len(service.containers()),  0)
self.assertEqual(len(service.containers()),  3)



Clone # 1286
Distance between two fragments = 1
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 362
Source file "../tests/beets/ui/migrate.py"
The first line is 341
log.debug(u'copying  state  file  from  {0}  to  {1}'.format(
  util.displayable_path(srcfn),  util.displayable_path(destfn)
))
log.debug(u'copying  database  from  {0}  to  {1}'.format(
  util.displayable_path(srcfn),  util.displayable_path(destfn)
))
util.copy(srcfn,  destfn) util.copy(srcfn,  destfn)
  return  destfn

  return  destfn



Clone # 1287
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 63
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 76
  db.delete_table(u'wagtailcore_site')
  db.delete_table(u'wagtailsearch_querydailyhits')
  db.delete_table(u'wagtailcore_page')
  db.delete_table(u'wagtailsearch_editorspick')
  db.delete_table(u'wagtailcore_pagerevision')
  db.delete_table(u'wagtailsearch_searchtest')
  db.delete_table(u'wagtailcore_grouppagepermission')

  db.delete_table(u'wagtailsearch_searchtestchild')



Clone # 1288
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0001_initial.py"
The first line is 63
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 73
  db.delete_table(u'wagtailcore_site')
  db.delete_table(u'wagtailsearch_query')
  db.delete_table(u'wagtailcore_page')
  db.delete_table(u'wagtailsearch_querydailyhits')
  db.delete_table(u'wagtailcore_pagerevision')
  db.delete_table(u'wagtailsearch_editorspick')
  db.delete_table(u'wagtailcore_grouppagepermission')

  db.delete_table(u'wagtailsearch_searchtest')



Clone # 1289
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 76
Source file "../tests/wagtail/wagtail/wagtailsearch/migrations/0001_initial.py"
The first line is 73
  db.delete_table(u'wagtailsearch_querydailyhits')
  db.delete_table(u'wagtailsearch_query')
  db.delete_table(u'wagtailsearch_editorspick')
  db.delete_table(u'wagtailsearch_querydailyhits')
  db.delete_table(u'wagtailsearch_searchtest')
  db.delete_table(u'wagtailsearch_editorspick')
  db.delete_table(u'wagtailsearch_searchtestchild')
  db.delete_table(u'wagtailsearch_searchtest')



Clone # 1290
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1553
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/conftest.py"
The first line is 60
sys.stdout.write(
  '\nThe  best  BASE85  based  alphabet  for  your  setup  is:  %s\n'  %  (
    last_good)
)
sys.stdout.write(
  "Destroying  test  database  for  alias  '%s'  (%s)...\n"  %  (
    connection.aliasdbtestname)
)
  sys.stdout.flush()

sys.stdout.flush()



Clone # 1291
Distance between two fragments = 4
Clone size = 6
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 247
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 140
siblings  =  target_node.get_siblings() siblings  =  target.get_siblings()
siblings  =  {
 
'left':  siblings.filter(sib_order__gte=target_node.sib_order),
  'right':  siblings.filter(sib_order__gt=target_node.sib_order),
  'first-sibling':  siblings
}[pos]
siblings  =  {'left':  siblings.filter(path__gte=target.path),
  'right':  siblings.filter(path__gt=target.path),
  'first-sibling':  siblings}[pos]



Clone # 1292
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 69
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 112
  popular_queries  =  models.Query.get_most_popular()
  popular_queries  =  models.Query.get_most_popular()
self.assertEqual(popular_queries.count(),  2) self.assertEqual(popular_queries.count(),  2)
self.assertEqual(popular_queries[0],  models.Query.get("popular  query")) self.assertEqual(popular_queries[0],  models.Query.get("old  popular  query"))
  self.assertEqual(popular_queries[1],  models.Query.get("unpopular  query"))
  self.assertEqual(popular_queries[1],  models.Query.get("new  popular  query"))



Clone # 1293
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 288
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 309
target  =  target.get_last_child() target  =  target.get_last_child()
pos  =  {'first-child':  'first-sibling',
  'last-child':  'last-sibling',
  'sorted-child':  'sorted-sibling'}[pos]
  pos  =  {'first-child':  'first-sibling',
    'last-child':  'last-sibling',
    'sorted-child':  'sorted-sibling'}[pos]



Clone # 1294
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 152
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 85
val2  =  models.IntegerField() sib_order  =  models.PositiveIntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1295
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 138
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 85
val2  =  models.IntegerField() sib_order  =  models.PositiveIntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1296
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 128
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 85
val2  =  models.IntegerField() sib_order  =  models.PositiveIntegerField()
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1297
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 97
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 94
  def  _get(self,  url,  **kwargs):
    return  self.get(url,  **self._set_request_timeout(kwargs))
  def  _post(self,  url,  **kwargs):
    return  self.post(url,  **self._set_request_timeout(kwargs))
  def  _delete(self,  url,  **kwargs):
    return  self.delete(url,  **self._set_request_timeout(kwargs))
  def  _get(self,  url,  **kwargs):
    return  self.get(url,  **self._set_request_timeout(kwargs))



Clone # 1298
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 133
Source file "../tests/beets/mediafile.py"
The first line is 728
  if  'sib_order'  in  fields:
    del  fields['sib_order']
if  'coverart'  in  mutagen_file:
  del  mutagen_file['coverart']
  if  'id'  in  fields:
    del  fields['id']
if  'coverartmime'  in  mutagen_file:
  del  mutagen_file['coverartmime']



Clone # 1299
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/migrations/0002_initial_data.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 11
if  connection.vendor  ==  'sqlite':
  set_autocommit(True)
if  connection.vendor  ==  'sqlite':
  set_autocommit(True)
document_content_type,  created  =  orm['contenttypes.ContentType'].objects.get_or_create(
  model='document',  app_label='wagtaildocs',  defaults={'name':  'document'})
  page_content_type,  created  =  orm['contenttypes.contenttype'].objects.get_or_create(
    model='page',  app_label='wagtailcore',  defaults={'name':  'page'})



Clone # 1300
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/migrations/0002_initial_data.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailcore/migrations/0002_initial_data.py"
The first line is 11
if  connection.vendor  ==  'sqlite':
  set_autocommit(True)
if  connection.vendor  ==  'sqlite':
  set_autocommit(True)
image_content_type,  created  =  orm['contenttypes.ContentType'].objects.get_or_create(
  model='image',  app_label='wagtailimages',  defaults={'name':  'image'})
  page_content_type,  created  =  orm['contenttypes.contenttype'].objects.get_or_create(
    model='page',  app_label='wagtailcore',  defaults={'name':  'page'})



Clone # 1301
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 778
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 553
if  parent  is  None:
  #  return  the  entire  tree
  return  cls.objects.all()
if  parent  is  None:
  #  return  the  entire  tree
  return  cls.objects.all()
if  parent.is_leaf():
  return  cls.objects.filter(pk=parent.pk)
if  parent.is_leaf():
  return  cls.objects.filter(pk=parent.pk)



Clone # 1302
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 32
Source file "../tests/wagtail/wagtail/wagtailsearch/views/frontend.py"
The first line is 26
  if  template_ajax  is  None:
    if  hasattr(settings,  'WAGTAILSEARCH_RESULTS_TEMPLATE_AJAX'):
      template_ajax  =  settings.WAGTAILSEARCH_RESULTS_TEMPLATE_AJAX
    else:
      template_ajax  =  template
  if  template  is  None:
    if  hasattr(settings,  'WAGTAILSEARCH_RESULTS_TEMPLATE'):
      template  =  settings.WAGTAILSEARCH_RESULTS_TEMPLATE
    else:
      template  =  'wagtailsearch/search_results.html'



Clone # 1303
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 553
Source file "../tests/beets/util/functemplate.py"
The first line is 557
interp_time  =  timeit.timeit('_tmpl.interpret(_vars,  _funcs)',
  'from  __main__  import  _tmpl,  _vars,  _funcs',
  number=10000)
comp_time  =  timeit.timeit('_tmpl.substitute(_vars,  _funcs)',
  'from  __main__  import  _tmpl,  _vars,  _funcs',
  number=10000)
print(interp_time) print(comp_time)



Clone # 1304
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 141
Source file "../tests/beets/ui/commands.py"
The first line is 139
if  info.label:
  disambig.append(info.label)
if  info.country:
  disambig.append(info.country)
  if  info.albumdisambig:
    disambig.append(info.albumdisambig)
if  info.label:
  disambig.append(info.label)



Clone # 1305
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 740
Source file "../tests/beets/library.py"
The first line is 655
if  copy:
  util.copy(path,  artdest)
else:
  util.move(path,  artdest)
if  copy:
  util.copy(old_art,  new_art)
else:
  util.move(old_art,  new_art)
  self.artpath  =  artdest
  self.artpath  =  new_art



Clone # 1306
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/templatetags/gravatar.py"
The first line is 25
Source file "../tests/wagtail/wagtail/wagtailimages/templatetags/image_tags.py"
The first line is 37
  try:
    email  =  self.email.resolve(context)
  except  template.VariableDoesNotExist:
    return  ''
  try:
    image  =  self.image_var.resolve(context)
  except  template.VariableDoesNotExist:
    return  ''



Clone # 1307
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 34
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 104
class  MP_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(MP_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 
class  AL_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(AL_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 



Clone # 1308
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 34
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 65
class  MP_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(MP_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 
class  NS_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(NS_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 



Clone # 1309
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 104
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 65
class  AL_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(AL_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 
class  NS_TestNodeSomeDep(models.Model):
    node  =  models.ForeignKey(NS_TestNode)
 
    def  __str__(self):    #  pragma:  no  cover
      return  'Node  %d'  %  self.pk
 
 



Clone # 1310
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/tests/split_buffer_test.py"
The first line is 32
Source file "../tests/fig/tests/split_buffer_test.py"
The first line is 31
yield  "b" yield  "a"
yield  "c" yield  "b"
yield  "\n" yield  "c"
  yield  "d"
yield  "\n"



Clone # 1311
Distance between two fragments = 0
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 407
Source file "../tests/beets/util/__init__.py"
The first line is 387
if  samefile(path,  dest):
  return
if  samefile(path,  dest):
  return
path  =  syspath(path) path  =  syspath(path)
dest  =  syspath(dest) dest  =  syspath(dest)



Clone # 1312
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 146
Source file "../tests/wagtail/setup.py"
The first line is 13
try:
    return  float(value)
except  ValueError:
    pass
 
try:
    import  multiprocessing
except  ImportError:
    pass
 
 



Clone # 1313
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/multiplexer.py"
The first line is 4
Source file "../tests/wagtail/setup.py"
The first line is 3
try:
    from  Queue  import  QueueEmpty
except  ImportError:
    from  queue  import  Queue,  Empty    #  Python  3.x
 
 
try:
    from  setuptools  import  setupfind_packages
except  ImportError:
    from  distutils.core  import  setup
 
 



Clone # 1314
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/multiplexer.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 24
try:
    from  Queue  import  Queue,  Empty
except  ImportError:
    from  queue  import  Queue,  Empty    #  Python  3.x
 
 
try:
    from  collections  import  OrderedDict
except  ImportError:
    from  ordereddict  import  OrderedDict
 



Clone # 1315
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 55
Source file "../tests/fig/fig/packages/docker/unixconn/unixconn.py"
The first line is 23
  try:
    format_name  =  format_name.name
  except  AttributeError:
    pass
try:
    import  requests.packages.urllib3.connectionpool  as  connectionpool
except  ImportError:
    import  urllib3.connectionpool  as  connectionpool
 
 



Clone # 1316
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/formats.py"
The first line is 55
Source file "../tests/wagtail/setup.py"
The first line is 13
  try:
    format_name  =  format_name.name
  except  AttributeError:
    pass
try:
    impormultiprocessing
except  ImportError:
    pass
 
 



Clone # 1317
Distance between two fragments = 1
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 140
Source file "../tests/beets/ui/migrate.py"
The first line is 146
  try:
    return  int(value)
  except  ValueError:
    pass
try:
    return  float(value)
except  ValueError:
    pass
 



Clone # 1318
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/setup.py"
The first line is 3
Source file "../tests/beets/util/confit.py"
The first line is 24
try:
    from  setuptools  import  setup,  find_packages
except  ImportError:
    from  distutils.core  import  setup
 
 
try:
    from  collections  import  OrderedDict
except  ImportError:
    from  ordereddict  import  OrderedDict
 



Clone # 1319
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 140
Source file "../tests/wagtail/setup.py"
The first line is 13
  try:
    return  int(value)
  except  ValueError:
    pass
try:
    import  multiprocessing
except  ImportError:
    pass
 
 



Clone # 1320
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/packages/docker/unixconn/unixconn.py"
The first line is 23
Source file "../tests/wagtail/setup.py"
The first line is 13
try:
    import  requests.packages.urllib3.connectionpool  as  connectionpool
except  ImportError:
    import  urllib3.connectionpool  as  connectionpool
 
 
try:
    import  multiprocessing
except  ImportError:
    pass
 
 



Clone # 1321
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/query.py"
The first line is 182
Source file "../tests/beets/dbcore/types.py"
The first line is 111
  try:
    return  float(s)
  except  ValueError:
    return  None
  try:
    return  float(string)
  except  ValueError:
    return  0.0



Clone # 1322
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/query.py"
The first line is 182
Source file "../tests/beets/dbcore/types.py"
The first line is 66
  try:
    return  float(s)
  except  ValueError:
    return  None
  try:
    return  int(string)
  except  ValueError:
    return  0



Clone # 1323
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/query.py"
The first line is 182
Source file "../tests/beets/library.py"
The first line is 96
  try:
    return  float(s)
  except  ValueError:
    return  None
  try:
    return  float(string)
  except  ValueError:
    return  0.0



Clone # 1324
Distance between two fragments = 0
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 111
Source file "../tests/beets/library.py"
The first line is 96
  try:
    return  float(string)
  except  ValueError:
    return  0.0

  try:
    return  float(string)
  except  ValueError:
    return  0.0



Clone # 1325
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 66
Source file "../tests/beets/library.py"
The first line is 96
  try:
    return  int(string)
  except  ValueError:
    return  0

  try:
    return  float(string)
  except  ValueError:
    return  0.0



Clone # 1326
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/mediafile.py"
The first line is 604
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 258
  try:
    return  frame.text[0]
  except  IndexError:
    return  None

  try:
    return  self.get_children()[0]
  except  IndexError:
    return  None



Clone # 1327
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/mediafile.py"
The first line is 604
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 153
  try:
    return  frame.text[0]
  except  IndexError:
    return  None

  try:
    return  cls.get_root_nodes()[0]
  except  IndexError:
    return  None



Clone # 1328
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/query.py"
The first line is 182
Source file "../tests/beets/ui/migrate.py"
The first line is 146
  try:
    return  float(s)
  except  ValueError:
    return  None
try:
    return  float(value)
except  ValueError:
    pass
 



Clone # 1329
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/query.py"
The first line is 182
Source file "../tests/beets/ui/migrate.py"
The first line is 140
  try:
    return  float(s)
  except  ValueError:
    return  None
  try:
    return  int(value)
  except  ValueError:
    pass



Clone # 1330
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 111
Source file "../tests/beets/ui/migrate.py"
The first line is 146
  try:
    return  float(string)
  except  ValueError:
    return  0.0

try:
    return  float(value)
except  ValueError:
    pass
 



Clone # 1331
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 111
Source file "../tests/beets/ui/migrate.py"
The first line is 140
  try:
    return  float(string)
  except  ValueError:
    return  0.0

  try:
    return  int(value)
  except  ValueError:
    pass



Clone # 1332
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 66
Source file "../tests/beets/ui/migrate.py"
The first line is 146
  try:
    return  int(string)
  except  ValueError:
    return  0

try:
    return  float(value)
except  ValueError:
    pass
 



Clone # 1333
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/dbcore/types.py"
The first line is 66
Source file "../tests/beets/ui/migrate.py"
The first line is 140
  try:
    return  int(string)
  except  ValueError:
    return  0

  try:
    return  int(value)
  except  ValueError:
    pass



Clone # 1334
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 96
Source file "../tests/beets/ui/migrate.py"
The first line is 146
  try:
    return  float(string)
  except  ValueError:
    return  0.0

try:
    return  float(value)
except  ValueError:
    pass
 



Clone # 1335
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 96
Source file "../tests/beets/ui/migrate.py"
The first line is 140
  try:
    return  float(string)
  except  ValueError:
    return  0.0

  try:
    return  int(value)
  except  ValueError:
    pass



Clone # 1336
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 59
Source file "../tests/beets/dbcore/types.py"
The first line is 31
_table  =  None sql  =  None
  """
  """
_flex_table  =  None query  =  None
  """
  """



Clone # 1337
Distance between two fragments = 4
Clone size = 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2259
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2236
output_template  =  ('<input  type="checkboxclass="action-select"  ' output_template  =  '<li><a  href="%i/>Node  %i</a>'
  for  object  in  model.objects.all():
    expected_output  =  output_template  %  (object.pk,  object.pk,
      object.pk
)
    assert  expected_output  in  table_output

  for  object  in  model.objects.all():
    expected_output  =  output_template  %  (object.pk,  object.pk)
    assert  expected_output  in  table_output



Clone # 1338
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1339
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1340
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 145
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1341
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1342
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1343
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1344
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1345
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1346
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 300
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1347
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1348
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1349
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 71
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1350
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1351
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1352
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 8
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1353
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    #  Login

    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1354
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    #  Login

    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1355
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 246
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    #  Login

    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1356
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1357
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1358
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 109
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1359
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1360
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1361
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 42
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1362
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1363
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1364
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 261
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1365
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1366
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1367
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1368
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1369
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1370
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 144
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1371
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1372
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1373
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 49
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1374
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 30
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_create'),  params)



Clone # 1375
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 165
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_add_image'),  params)



Clone # 1376
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 70
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 92
  def  setUp(self):
    login(self.client)
  def  setUp(self):
    login(self.client)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_add_redirect'),  params)



Clone # 1377
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/base.py"
The first line is 22
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/base.py"
The first line is 28
  def  reset_index(self):
    return  NotImplemented
  def  refresh_index(self):
    return  NotImplemented
  def  add_type(self,  model):
    return  NotImplemented
  def  add(self,  obj):
    return  NotImplemented



Clone # 1378
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailsearch/backends/db.py"
The first line is 17
  def  reset_index(self):
    pass  #  Not  needed
  def  refresh_index(self):
    pass  #  Not  needed
  def  add_type(self,  model):
    pass  #  Not  needed
  def  add(self,  obj):
    pass  #  Not  needed



Clone # 1379
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 222
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 218
  def  get_siblings(self):    #  pragma:  no  cover
    """
   
:returns:

      A  queryset  of  all  the  node's  siblings,  including  the  node
      itself.
   
"""
    raise  NotImplementedError
  def  get_depth(self):    #  pragma:  no  cover
    """:returns:  the  depth  (level)  of  the  node"""
    raise  NotImplementedError
  def  get_children(self):    #  pragma:  no  cover
    """:returns:  A  queryset  of  all  the  node's  children"""
    raise  NotImplementedError
  def  get_siblings(self):    #  pragma:  no  cover
    """
   
:returns:

   
  A  queryset  of  all  the  node's  siblings,  including  the  node
     
itself.
   
"""
    raise  NotImplementedError



Clone # 1380
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 239
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 231
  def  get_descendants(self):
    """
   
:returns:

   
  A  queryset  of  all  the  node's  descendants,  doesn't
      include  the  node  itself  (some  subclasses  may  return  a  list).
   
"""
    raise  NotImplementedError
  def  get_children(self):    #  pragma:  no  cover
    """:returns:  A  queryset  of  all  the  node's  children"""
    raise  NotImplementedError
  def  get_descendant_count(self):
    """:returns:  the  number  of  descendants  of  a  node."""
    return  self.get_descendants().count()
  def  get_children_count(self):
    """:returns:  The  number  of  the  node's  children"""
    return  self.get_children().count()



Clone # 1381
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 171
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 222
  def  find_problems(cls):    #  pragma:  no  cover
    """Checks  for  problems  in  the  trestructure."""
    raise  NotImplementedError
  def  get_siblings(self):    #  pragma:  no  cover
    """
    :r
eturns:

      A  queryset  of  all  the  node's  siblings,  including  thnode
      it
self.
   
"""
    raise  NotImplementedError
  def  fix_tree(cls):    #  pragma:  no  cover
    """
    Solv
es  problems  that  can  appear  when  transactions  are  not  used  and
    a  piece
  of  code  breaks,  leaving  the  tree  in  an  inconsistent  state.
   
"""
    raise  NotImplementedError
  def  get_children(self):    #  pragma:  no  cover
    """:returns:  A  queryset  of  all  the  node's  children"""
    raise  NotImplementedError



Clone # 1382
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 313
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 341
  def  field_classnames(self):
    """
    Additional  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <
ul  class="fields">
    """
    return  ""
  def  render_js(self):
    """
    Render  a  snippet  of  Javascript  code  to  be  executed  when  this  object's  rendered
    HTML  is  inserted  into  the  DOM.  (This  won't  necessari
ly  happen  on  page  load...)
    """
    ret
urn  ""
  def  field_type(self):
    """
    The  kind  of  field  it  ie.g  boolean_field.  Useful  for  better  semantic  markup  of  field  display  based  on  type
    """
    return  ""
  def  rendered_fields(self):
    """
    return  a  list  of  the  fieldof  the  passed  form  which  are  rendered  by  this
    EditHandl
er.
    """
    return  []



Clone # 1383
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 28
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 25
  def  test_editor_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.editor))
  def  test_administrator_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.administrator))
  def  test_owner_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.owner))
  def  test_editor_can_edit(self):
    self.assertTrue(self.document.is_editable_by_user(self.editor))



Clone # 1384
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 63
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 60
  def  test_editor_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.editor))
  def  test_administrator_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.administrator))
  def  test_owner_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.owner))
  def  test_editor_can_edit(self):
    self.assertTrue(self.image.is_editable_by_user(self.editor))



Clone # 1385
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 109
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 64
def  mpsmallstep_model(request):
    return  _prepare_db_test(request)
 
 
def  model(request):
    return  _prepare_db_test(request)
 
 
def  mpm2muser_model(request):
    return  _prepare_db_test(request)
 
 
def  model_without_proxy(request):
    return  _prepare_db_test(request)
 
 



Clone # 1386
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 1058
Source file "../tests/beets/library.py"
The first line is 1053
  def  tmpl_upper(s):
    """Covert  a  string  to  upper  case."""
    return  s.upper()
  def  tmpl_lower(s):
    """Convert  a  string  to  lower  case."""
    return  s.lower()
  def  tmpl_title(s):
    """Convert  a  string  to  title  case."""
    return  s.title()
  def  tmpl_upper(s):
    """Covert  a  string  to  upper  case."""
    return  s.upper()



Clone # 1387
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 171
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/models.py"
The first line is 218
  def  find_problems(cls):    #  pragma:  no  cover
    """Checks  for  problems  in  the  trestructure."""
    raise  NotImplementedError
  def  get_depth(self):    #  pragma:  no  cover
    """:returns:  the  depth  (level)  of  thnode"""
    raise  NotImplementedError
  def  fix_tree(cls):    #  pragma:  no  cover
    """
    Solves  problems  that  can  appear  when  transactions  are  not  used  and
    a  piece  of  co
de  breaks,  leaving  the  tree  in  an  inconsistent  state.
    """
    raise  NotImplementedError
  def  get_siblings(self):    #  pragma:  no  cover
    """
    :returns:

      A  queryset 
of  all  the  node's  siblings,  including  the  node
   
  itself.
    """
    raise  NotImplementedError



Clone # 1388
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 728
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 326
  def  can_reorder_children(self):
    """
    Keep  reorder  permissions  the  same  as  publishing,  since  it  immediately  affects  published  pages
    (and  the  use
-cases  for  a  non-admin  needing  to  do  it  are  fairly  obscure...)
    """
    return  self.can_publish_subpage
()
  def  render_as_object(self):
    """
    Render  this  object  as  it  should  appear  within  an  ObjectList.  Should  not
    include  the  <h2>  heading  or  help  text  -  ObjectList  will  supply  those
    """
    #  by  default,  assu
me  that  the  subclass  provides  a  catch-all  render()  method
    return  self.render()
  def  can_move(self):
    """
    Moving  a  page  should  be  logically  equivalent  to  deleting  and  re-adding  it  (and  all  its  children).
    As  such,  the  permission  test  for  'can  this  be  moved  at  all?'  should  be  the  same  as  for  deletion.
    (Further  constraints  will  then
  applon  where  it  can  be  moved  *to*.)
    """
    return  self.can_delete
()
  def  render_as_field(self):
    """
    Render  this  object  as  it  should  appear  within  a  <ul  class="fields">  list  item
    """
    #  b
default,  assume  that  the  subclass  provides  a  catch-all  render()  method
    return  self.render()



Clone # 1389
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 341
Source file "../tests/beets/plugins.py"
The first line is 54
  def  render_js(self):
    """
    Render  a  snippet  of  Javascript  code  to  be  executed  when  this  object'rendered
    HTML  iinserted  into  the  DOM.  (This  won't  necessarily  happen  on  page  load...)
    """
    return  ""
  def  commands(self):
    """Should  return  a  list  of  beets.ui.Subcommand  objectfor
    commandthat  should  be  added  to  beets'  CLI.
    """
    return  ()
  def  rendered_fields(self):
    """
 
  return  a  lisof  the  fields  of  the  passed  form  which  are  rendered  by  this
    EditHandler
.
    """
    return  []
  def  queries(self):
    """Should  return  a  dicmapping  prefixes  to  Query  subclasses.
    """
    return  {}



Clone # 1390
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 341
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 272
  def  render_js(self):
    """
    Render  a  snippet  of  Javascript  code  to  be  executed  when  this  object's  rendered
    HTML  is  inserted  into  the  DOM.  (This  won't  necessarily  happen  on  page  load...)
    """

    return  ""
  def  widget_overrides(cls):
    return  {}
  def  rendered_fields(self):
    """
    return  a  list  of  the  fields  of  the  passed  f
orm  which  are  rendered  by  this
    EditHandler.
    """

    return  []
  def  required_formsets(cls):
    return  []



Clone # 1391
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 341
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 306
  def  render_js(self):
    """
    Render  a  snippet  of  Javascript  code  to  be  executewhen  this  object's  rendered
    HTML  is  inserted  into  the  DOM.  (This  won't  necessarily  happen  on  page  load...)
    """
    return  ""
  def  object_classnames(self):
    """
    Additional  classnames  to  adto  the  <li  class="object">  when  rendering  this
    within  an  ObjectList
    """
    return  ""
  def  rendered_fields(self):
    """
    return  a  list  of  the  fields  of  the  passed  form  which  are  rendered  by  this
    EditHandler.
    """
    return  []
  def  field_classnames(self):
    """
    Additional  classnameto  add  to  the  <li>  when  rendering  this  within  a
    <ul  class="fields">
    """
    return  ""



Clone # 1392
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/plugins.py"
The first line is 54
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 313
  def  commands(self):
    """Should  return  a  list  of  beets.ui.Subcommand  objects  for
    commands  that  should  be  added  to  beets'  CLI.
    """
    return  ()
  def  field_classnames(self):
    """
    Additional  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <ul  class="fields">

    """
    return  ""
  def  queries(self):
    """Should  return  a  dict  mapping  prefixes  to  Query  subclasses.
    """
    return  {}
  def  field_type(self):
    """
    T
he  kind  of  field  it  is  e.g  boolean_field.  Useful  for  better  semantic  markup  of  field  display  based  on  type
    """
    return  ""



Clone # 1393
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/plugins.py"
The first line is 54
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 306
  def  commands(self):
    """Shoulreturn  list  of  beets.ui.Subcommand  objects  for
    commands  that  should  be  added  to  beets'  CLI.
    """
    return  ()
  def  object_classnames(self):
    """
    Additi
onal  classnames  to  adto  the  <li  class="object">  when  rendering  this
    within  an  ObjectList
    """
    return  ""
  def  queries(self):
    """Should  return  a  dicmapping  prefixes  to  Query  subclasses.
    """
    return  {}
  def  field_classnames(self):
    """
    A
dditional  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <
uclass="fields">
    """
    return  ""



Clone # 1394
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 46
Source file "../tests/beets/plugins.py"
The first line is 54
  def  waitables(self):
    """Return  "waitable"  objects  to  pass  to  select().  Should  return
    three  iterables  for  input  readiness,  output  readiness,  and
    exceptional  condition
s  (i.e.,  ththree  lists  passed  to
    select()).
    """
    return  (),  (),  ()
  def  commands(self):
    """Should  return  a  list  of  beets.ui.Subcommand  objects  for
    commands  that  should  badded  to  beets'  CLI.
    """
    return  ()
  def  fire(self):
    """Called  when  an  associated  file  descriptor  becomes  ready
    (i.e.,  is
  returned  from  a  select()  call).
    """
    pass
  def  queries(self):
    """Should  return  a  dict  mapping  prefixes  to  Query  subclasses.
    """
    return  {}



Clone # 1395
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 46
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 341
  def  waitables(self):
    """Return  "waitable"  objects  to  pass  to  select().  Should  return
    three  iterables  for  input  readiness,  output  readiness,  and
    exceptional  conditions  (i.e.,  the  three  lists  passed  to
    select()).
    """
    return  (),  (),  ()
  def  render_js(self):
    """
   
Render  a  snippet  of  Javascript  code  to  be  executed  when  this  object's  rendered
    HTML  is  inserted  into  the  DOM.  (This  won't  necessari
ly  happen  on  page  load...)
    """
    ret
urn  ""
  def  fire(self):
    """Called  when  an  associated  file  descriptor  becomes  ready
    (i.e.,  is  returned  froa  select()  call).
    """
    pass
  def  rendered_fields(self):
    """
    return  a  list  of  the  fields  of  the  passed  forwhich  are  rendered  by  this
    EditHand
ler.
    """
    return  []



Clone # 1396
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 46
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 313
  def  waitables(self):
    """Return  "waitable"  objects  to  pass  to  select().  Should  return
    three  iterables  for  input  readiness,  output  readiness,  and
    excep
tional  condition(i.e.,  the  three  lists  passed  to
    s
elect()).
    """
    return  (),  (),  ()
  def  field_classnames(self):
    """
    Additional  classnameto  add  to  the  <li>  when  rendering  this  within  a
    <ul  cl
ass="fields">
    """
    return  ""
  def  fire(self):
    """Callewhen  an  associated  file  descriptor  becomes  ready
    (i.e., 
is  returned  from  a  select()  call).
    """
    pass
  def  field_type(self):
    """
    Th
e  kinof  field  it  is  e.g  boolean_field.  Useful  for  better  semantic  markup  of  field  display  based  on  type
    """
    return  ""



Clone # 1397
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 46
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 306
  def  waitables(self):
    """Return  "waitable"  objects  to  pass  to  select().  Should  return
    three  iterables  for  input  readiness,  output  readiness,  and
    excep
tional  condition(i.e.,  the  three  lists  passed  to
    select()).

    """
    return  (),  (),  ()
  def  object_classnames(self):
    """
    Additional  classnameto  add  to  the  <li  class="object">  when  rendering  this
    within  an  Obj
ectList
    """
    return  ""
  def  fire(self):
    """Called  when  an  associated  file  descriptor  becomes  ready
    (i.e.,  is  returned  from  a  select()  call).
    """
    pass
  def  field_classnames(self):
    """
    Addition
al  classnames  to  add  to  the  <li>  when  rendering  this  within  a
    <ul  class="fields">
    """
    return  ""



Clone # 1398
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/mediafile.py"
The first line is 913
Source file "../tests/beets/mediafile.py"
The first line is 910
  def  month_field(self):
    return  DateItemField(self,  1)
  def  year_field(self):
    return  DateItemField(self,  0)
  def  day_field(self):
    return  DateItemField(self,  2)

  def  month_field(self):
    return  DateItemField(self,  1)



Clone # 1399
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/home.py"
The first line is 61
Source file "../tests/wagtail/wagtail/wagtailadmin/views/home.py"
The first line is 41
  def  render(self):
    return  render_to_string('wagtailadmin/home/recent_edits.html',  {
      'last_edits':  self.last_edits,
    },  RequestContext(self.request))

  def  render(self):
    return  render_to_string('wagtailadmin/home/pages_for_moderation.html',  {
      'page_revisions_for_moderation':  self.page_revisions_for_moderation,
    },  RequestContext(self.request))



Clone # 1400
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 526
Source file "../tests/beets/util/bluelet.py"
The first line is 534
def  spawn(coro):
    """Event:  adanother  coroutine  to  the  scheduler.  Both  the  parent
    and  child  coroutines  run  concurrently
.
    """
    if  not  isinstance(coro,  types.GeneratorType):
      raise  ValueError('%s  is  not  a  coroutine'  %  str(coro))
    return  SpawnEvent(coro)
 
def  call(coro):
    """Event:  delegate  to  another  coroutine.  The  current  coroutine
    is  resume
once  the  sub-coroutine  finishes.  If  the  sub-coroutine
    returns  a  value  using  en
d(),  then  this  event  returns  that  value.
    """
    if  not  isinstance(coro,  types.GeneratorType):
      raise  ValueError('%s  is  not  a  coroutine'  %  str(coro))
    return  DelegationEvent(coro)
 



Clone # 1401
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 111
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 34
if  commit:
  user.save()
  self.save_m2m()
if  commit:
  user.save()
  self.save_m2m()
return  user   return  user



Clone # 1402
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 181
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 87
post_data  =  {
  'title':  "I've  been  edited!",
  'content':  "Some  content",
  'slug':  'hello-world',
}
post_data  =  {
  'title':  "New  page!",
  'content':  "Some  content",
  'slug':  'hello-world',
}



Clone # 1403
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 317
Source file "../tests/fig/fig/cli/log_printer.py"
The first line is 40
params  =  {
  'stdout':  1,
  'stderr':  1,
  'stream':  1
}
params  =  {
  'stdout':  True,
  'stderr':  True,
  'stream':  True,
}



Clone # 1404
Distance between two fragments = 3
Clone size = 5
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 62
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 67
password1  =  forms.CharField(
  label=_("Password"),
  required=False,
  widget=forms.PasswordInput,
  help_text=_("Leave  blank  if  not  changing."))
  password2  =  forms.CharField(
    label=_("Password  confirmation"),  required=False,
    widget=forms.PasswordInput,
    help_text=_("Enter  the  same  password  as  above,  for  verification."))



Clone # 1405
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 181
Source file "../tests/beets/util/bluelet.py"
The first line is 183
for  ready  in  rready:
  ready_events.add(waitable_to_event[('r',  ready)])
for  ready  in  wready:
  ready_events.add(waitable_to_event[('w',  ready)])
for  ready  in  wready:
  ready_events.add(waitable_to_event[('w',  ready)])
  for  ready  in  xready:
    ready_events.add(waitable_to_event[('x',  ready)])



Clone # 1406
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 160
Source file "../tests/beets/util/bluelet.py"
The first line is 158
for  waitable  in  w:
  waitable_to_event[('w',  waitable)]  =  event
for  waitable  in  r:
  waitable_to_event[('r',  waitable)]  =  event
  for  waitable  in  x:
    waitable_to_event[('x',  waitable)]  =  event
for  waitable  in  w:
  waitable_to_event[('w',  waitable)]  =  event



Clone # 1407
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/errors.py"
The first line is 56
Source file "../tests/fig/fig/cli/errors.py"
The first line is 47
class  FigFileNotFound(UserError):
  def  __init__(self,  filena
me):
    super(FigFileNotFound,  self)
.__init__("""
    Can't  find
  %s.  Are  you  in  the  right  directory?
    """  %  filename)
class  ConnectionErrorGeneric(UserError):
    def  __init__(self,  url):
      super(ConnectionErrorGeneric,  self).__init__("""
      Couldn't  connect  to  Docker  daemon  at  %s  -  is  it  runnin
g?
 
      If  it's  at  a  non-standard  location,  specify  the 
URL  with  the  DOCKER_HOST  environment  variable.
      """
  %  url)
 
 



Clone # 1408
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/errors.py"
The first line is 40
Source file "../tests/fig/fig/cli/errors.py"
The first line is 13
class  ConnectionErrorDockerOSX(UserError):
    def  __init__(self):
      super(ConnectionErrorDockerOSX,  self)
.__init__("""
      Couldn't  connect  to  Docker  daemon  -  y
ou  might  need  to  run  `docker-osx  shell`.
      """)
 
 
class  DockerNotFoundMac(UserError):
    def  __init__(self):
      super(DockerNotFoundMac,  self).__init__("""
   
  Couldn't  connect  to  Docker  daemon.  You  might  need  to  install  docker-osx:
 
     
https://github.com/noplay/docker-osx
      """)
 
 



Clone # 1409
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 28
Source file "../tests/fig/fig/service.py"
The first line is 24
class  CannotBeScaledError(Exception):
    pass
 
 
class  BuildError(Exception):
    pass
 
 
class  ConfigError(ValueError):
    pass
 
 
class  CannotBeScaledError(Exception):
    pass
 
 



Clone # 1410
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 28
Source file "../tests/beets/mediafile.py"
The first line is 62
class  CannotBeScaledError(Exception):
    pass
 
 
class  UnreadableFileError(Exception):
    pass
 
class  ConfigError(ValueError):
    pass
 
 
class  FileTypeError(UnreadableFileError):
    pass
 
 
 



Clone # 1411
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 24
Source file "../tests/beets/mediafile.py"
The first line is 62
class  BuildError(Exception):
    pass
 
 
class  UnreadableFileError(Exception):
    pass
 
class  CannotBeScaledError(Exception):
    pass
 
 
class  FileTypeError(UnreadableFileError):
    pass
 
 
 



Clone # 1412
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 925
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 920
  def  test_delete_all_nodes(self,  model):
    model.objects.all().delete()
    count  =  model.objects.count()
    assert  count  ==  0

  def  test_delete_all_root_nodes(self,  model):
    model.get_root_nodes().delete()
    count  =  model.objects.count()
    assert  count  ==  0



Clone # 1413
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/image_ops.py"
The first line is 105
Source file "../tests/wagtail/wagtail/wagtailimages/image_ops.py"
The first line is 88
  (original_width,  original_height)  =  image.size
  (original_width,  original_height)  =  image.size
  if  original_height  <=  target_height:
    return  image
  if  original_width  <=  target_width:
    return  image
  scale  =  float(target_height)  /  original_height
  scale  =  float(target_width)  /  original_width



Clone # 1414
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2075
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2071
with  self.settings(STATIC_URL=None,  MEDIA_URL='/media/'):
  assert  get_static_url()  ==  '/media/'
with  self.settings(STATIC_URL=None,  MEDIA_URL=None):
  assert  get_static_url()  ==  '/'
  with  self.settings(STATIC_URL='/static/',  MEDIA_URL='/media/'):
    assert  get_static_url()  ==  '/static/'

with  self.settings(STATIC_URL='/static/',  MEDIA_URL=None):
  assert  get_static_url()  ==  '/static/'



Clone # 1415
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/mediafile.py"
The first line is 475
Source file "../tests/beets/mediafile.py"
The first line is 674
class  MP4SoundCheckStorageStyle(SoundCheckStorageStyleMixin,  MP4StorageStyle):
 
    def  __init__(self,  index=0,  **kwargs):
      super(MP4SoundCheckStorageStyle,  self).__init__(**kwargs)
      self.index  =  index
 
class  MP3SoundCheckStorageStyle(SoundCheckStorageStyleMixin,  MP3DescStorageStyle):
 
    def  __init__(self,  index=0,  **kwargs):
      super(MP3SoundCheckStorageStyle,  self).__init__(**kwargs)
      self.index  =  index
 
 



Clone # 1416
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 72
Source file "../tests/wagtail/wagtail/wagtailusers/forms.py"
The first line is 11
  is_superuser  =  forms.BooleanField(
    label=_("Administrator"),
    required=False,
    help_text=_("Administrators  have  the  ability  to  manage  user  accounts.")
  )
  is_superuser  =  forms.BooleanField(
    label=_("Administrator"),
    required=False,
    help_text=_("If  ticked,  this  user  has  the  ability  to  manage  user  accounts.")
  )



Clone # 1417
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 612
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 147
parentobj  =  lnk[parentpath] parentobj  =  lnk[node.parent_id]
if  'children'  not  in  parentobj:
  parentobj['children']  =  []
if  'children'  not  in  parentobj:
  parentobj['children']  =  []
parentobj['children'].append(newobj) parentobj['children'].append(newobj)



Clone # 1418
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/mp_tree.py"
The first line is 612
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 538
parentobj  =  lnk[parentpath] parentser  =  lnk[parentobj.pk]
if  'children'  not  in  parentobj:
  parentobj['children']  =  []
if  'children'  not  in  parentser:
  parentser['children']  =  []
parentobj['children'].append(newobj) parentser['children'].append(newobj)



Clone # 1419
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/al_tree.py"
The first line is 147
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/ns_tree.py"
The first line is 538
parentobj  =  lnk[node.parent_id] parentser  =  lnk[parentobj.pk]
if  'children'  not  in  parentobj:
  parentobj['children']  =  []
if  'children'  not  in  parentser:
  parentser['children']  =  []
parentobj['children'].append(newobj) parentser['children'].append(newobj)



Clone # 1420
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 11
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1421
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 250
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1422
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 112
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1423
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 45
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1424
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 264
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1425
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 140
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1426
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 73
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1427
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1428
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 250
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1429
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1430
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 45
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1431
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 264
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1432
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 140
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1433
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_queries.py"
The first line is 147
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get('/admin/search/queries/chooser/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1434
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1435
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 52
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1436
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1437
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1438
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 250
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1439
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1440
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 45
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1441
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 264
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1442
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 140
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1443
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1444
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 11
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailusers_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1445
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 250
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailadmin_pages_search'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1446
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 112
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1447
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 45
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1448
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 264
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1449
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 140
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1450
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailredirects_index'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1451
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 292
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_document_chosen',  args=(self.document.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1452
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 101
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 292
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_delete_document',  args=(self.document.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1453
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 87
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 292
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_edit_document',  args=(self.document.id,)),  params)
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1454
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 148
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1455
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 148
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1456
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 148
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1457
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 148
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1458
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 148
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1459
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 241
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_document_chosen',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1460
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 137
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 209
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_document_chosen',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1461
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 101
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 241
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_delete_document',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1462
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 101
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 209
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_delete_document',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1463
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 87
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 241
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_edit_document',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1464
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 87
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 209
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_edit_document',  args=(self.document.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1465
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1466
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1467
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1468
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1469
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/tests.py"
The first line is 73
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtaildocs_add_document'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1470
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 303
Source file "../tests/wagtail/wagtail/wagtailusers/tests.py"
The first line is 36
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailusers_create'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1471
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 303
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 171
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_add_image'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1472
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 303
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1473
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 303
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1474
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 303
Source file "../tests/wagtail/wagtail/wagtailredirects/tests.py"
The first line is 98
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_chooser_upload'),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailredirects_add_redirect'),  post_data)
def  test_status_code(self):
  self.assertEqual(self.get().status_code,  200)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1475
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 292
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 241
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_delete_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1476
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 292
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 209
  def  get(self,  params={}):
    return  self.client.get(reverse('wagtailimages_image_chosen',  args=(self.image.id,)),  params)
  def  post(self,  post_data={}):
    return  self.client.post(reverse('wagtailimages_edit_image',  args=(self.image.id,)),  post_data)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1477
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 74
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 24
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/suggest/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1478
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_editorspicks.py"
The first line is 74
Source file "../tests/wagtail/wagtail/wagtailsearch/tests/test_frontend.py"
The first line is 5
  def  get(self,  params={}):
    return  self.client.get('/admin/search/editorspicks/add/',  params)
  def  get(self,  params={}):
    return  self.client.get('/search/',  params)
  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)

  def  test_status_code(self):
    self.assertEqual(self.get().status_code,  200)



Clone # 1479
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 188
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 17
alphabet  =  '01234'   steplen  =  3
  desc  =  models.CharField(max_length=255)
  desc  =  models.CharField(max_length=255)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1480
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/project.py"
The first line is 41
Source file "../tests/beets/util/functemplate.py"
The first line is 162
  def  __init__(self,  nameservices,  client):
    self.name  =  name
    self.services  =  services
    self.client  =  client
  def  __init__(self,  identargs,  original):
    self.ident  =  ident
    self.args  =  args
    self.original  =  original



Clone # 1481
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 1151
Source file "../tests/beets/ui/commands.py"
The first line is 976
modify_cmd.parser.add_option('-y',  '--yes',  action='store_true',
  help='skip  confirmation')
update_cmd.parser.add_option('-p',  '--pretend',  action='store_true',
  help="show  all  changes  but  do  nothing")
modify_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)
update_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)



Clone # 1482
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 976
Source file "../tests/beets/ui/commands.py"
The first line is 868
update_cmd.parser.add_option('-p',  '--pretend',  action='store_true',
  help="show  all  changes  but  do  nothing")
list_cmd.parser.add_option('-p',  '--path',  action='store_true',
  help='print  paths  for  matched  items  or  albums')
update_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)
list_cmd.parser.add_option('-f',  '--format',  action='store',
  help='print  with  custom  format',  default=None)



Clone # 1483
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/hooks.py"
The first line is 339
Source file "../tests/beets/autotag/hooks.py"
The first line is 280
dist_max  =  self.max_distance dist_max  =  self.max_distance
if  dist_max:
  return  dist  /  dist_max
if  dist_max:
  return  self.raw_distance  /  self.max_distance
  return  0.0
  return  0.0



Clone # 1484
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 411
Source file "../tests/beets/ui/migrate.py"
The first line is 401
state_fn  =  migrate_state(replace=True) config_fn  =  migrate_config(replace=True)
if  state_fn:
  log.info(u'Migrated  state  file  to:  {0}'.format(
    util.displayable_path(state_fn)
  ))
if  config_fn:
  log.info(u'Migrated  configuration  to:  {0}'.format(
    util.displayable_path(config_fn)
  ))



Clone # 1485
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 120
Source file "../tests/wagtail/wagtail/wagtailadmin/views/chooser.py"
The first line is 86
  prompt_for_link_text  =  bool(request.GET.get('prompt_for_link_text'))
  prompt_for_link_text  =  bool(request.GET.get('prompt_for_link_text'))
  if  prompt_for_link_text:
    form_class  =  EmailLinkChooserWithLinkTextForm
  else:
    form_class  =  EmailLinkChooserForm
  if  prompt_for_link_text:
    form_class  =  ExternalLinkChooserWithLinkTextForm
  else:
    form_class  =  ExternalLinkChooserForm



Clone # 1486
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 65
Source file "../tests/wagtail/wagtail/wagtailadmin/edit_handlers.py"
The first line is 123
hour  =  int(hour_string) hour  =  int(hour_string)
  if  minute_string:
    minute  =  int(minute_string)
  else:
    minute  =  0
if  minute_string:
  minute  =  int(minute_string)
else:
  minute  =  0



Clone # 1487
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 117
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 73
desc  =  models.CharField(max_length=255) desc  =  models.CharField(max_length=255)
  related  =  models.ForeignKey(RelatedModel)
  related  =  models.ForeignKey(RelatedModel)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1488
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 117
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 44
desc  =  models.CharField(max_length=255) desc  =  models.CharField(max_length=255)
  related  =  models.ForeignKey(RelatedModel)
  related  =  models.ForeignKey(RelatedModel)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1489
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 73
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/models.py"
The first line is 44
desc  =  models.CharField(max_length=255) desc  =  models.CharField(max_length=255)
  related  =  models.ForeignKey(RelatedModel)
  related  =  models.ForeignKey(RelatedModel)
  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk

  def  __str__(self):    #  pragma:  no  cover
    return  'Node  %d'  %  self.pk



Clone # 1490
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 198
Source file "../tests/wagtail/wagtail/wagtailcore/tests.py"
The first line is 144
event_moderator  =  User.objects.get(username='eventmoderator') event_editor  =  User.objects.get(username='eventeditor')
homepage  =  Page.objects.get(url_path='/home/') homepage  =  Page.objects.get(url_path='/home/')
christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/') christmas_page  =  EventPage.objects.get(url_path='/home/events/christmas/')
  unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')
unpublished_event_page  =  EventPage.objects.get(url_path='/home/events/tentative-unpublished-event/')



Clone # 1491
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 99
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 83
document_json  =  json.dumps({'id':  document.id,  'title':  document.title})   document_json  =  json.dumps({'id':  document.id,  'title':  document.title})
return  render_modal_workflow(
  request,  None,  'wagtaildocs/chooser/document_chosen.js',
  {'document_json':  document_json}
)
  return  render_modal_workflow(
    request,  None,  'wagtaildocs/chooser/document_chosen.js',
    {'document_json':  document_json}
  )



Clone # 1492
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 211
Source file "../tests/wagtail/wagtail/wagtailsnippets/views/snippets.py"
The first line is 140
return  render(request,  'wagtailsnippets/snippets/confirm_delete.html',  {
  'content_type':  content_type,
  'snippet_type_name':  snippet_type_name,
  'instance':  instance,
})
  return  render(request,  'wagtailsnippets/snippets/create.html',  {
    'content_type':  content_type,
    'snippet_type_name':  snippet_type_name,
    'edit_handler':  edit_handler,
  })



Clone # 1493
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 95
Source file "../tests/wagtail/wagtail/wagtailimages/tests.py"
The first line is 81
  def  test_resize_to_min(self):
    rendition  =  self.image.get_rendition('min-120x120')

    #  Check  size
    self.assertEqual(rendition.width,  160)
    self.assertEqual(rendition.height,  120)
  def  test_minification(self):
    rendition  =  self.image.get_rendition('width-400')

    #  Check  size
    self.assertEqual(rendition.width,  400)
    self.assertEqual(rendition.height,  300)



Clone # 1494
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/util/pipeline.py"
The first line is 283
Source file "../tests/beets/util/pipeline.py"
The first line is 247
  with  self.abort_lock:
    if  self.abort_flag:
      return
with  self.abort_lock:
  if  self.abort_flag:
    return
  self.coro.send(msg)
  self.out_queue.put(msg)



Clone # 1495
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/util/pipeline.py"
The first line is 283
Source file "../tests/beets/util/pipeline.py"
The first line is 200
  with  self.abort_lock:
    if  self.abort_flag:
      return
with  self.abort_lock:
  if  self.abort_flag:
    return
  self.coro.send(msg)
  self.out_queue.put(msg)



Clone # 1496
Distance between two fragments = 0
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 949
Source file "../tests/beets/importer.py"
The first line is 915
if  _resume():
  task.save_progress()
if  _resume():
  task.save_progress()
  if  config['import']['incremental']:
    task.save_history()

if  config['import']['incremental']:
  task.save_history()



Clone # 1497
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/templatetags/admin_tree.py"
The first line is 9
Source file "../tests/wagtail/wagtail/wagtailembeds/embeds.py"
The first line is 1
import  sys
 
import  sys
from  django.db  import  models from  importlib  import  import_module
from  django.conf  import  settings from  django.conf  import  settings
from  django.contrib.admin.templatetags.admin_list  import  ( from  datetime  import  datetime



Clone # 1498
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/tags.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtaildocs/views/chooser.py"
The first line is 1
import  json
 
import  json
 
from  taggit.models  import  Tag
 
from  django.shortcuts  import  get_object_or_404,  render
from  django.http  import  HttpResponse from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
 
from  django.contrib.auth.decorators  import  permission_required
 



Clone # 1499
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/views/tags.py"
The first line is 1
Source file "../tests/wagtail/wagtail/wagtailimages/views/chooser.py"
The first line is 1
import  json
 
import  json
 
from  taggit.models  import  Tag
 
from  django.shortcuts  import  get_object_or_404,  render
from  django.http  import  HttpResponse from  django.core.paginator  import  Paginator,  EmptyPage,  PageNotAnInteger
from  django.contrib.auth.decorators  import  permission_required
 
 
from  django.contrib.auth.decorators  import  permission_required
 



Clone # 1500
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/plugins.py"
The first line is 18
Source file "../tests/beets/autotag/hooks.py"
The first line is 16
import  traceback import  logging
from  collections  import  defaultdict
 
from  collections  import  namedtuple
import  beets import  re
 
from  beets  import  mediafile
 
from  beets  import  plugins



Clone # 1501
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/pipeline.py"
The first line is 37
Source file "../tests/fig/fig/packages/six.py"
The first line is 23
import  sys import  sys
import  types
 
import  types
 
BUBBLE  =  '__PIPELINE_BUBBLE__' __author__  =  "Benjamin  Peterson  <benjamin@python.org>"
POISON  =  '__PIPELINE_POISON__'
 
__version__  =  "1.3.0"
 
 



Clone # 1502
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 23
Source file "../tests/beets/ui/__init__.py"
The first line is 30
import  beets.autotag.hooks import  struct
import  beets import  traceback
 
from  beets  import  util from  beets  import  library
from  beets  import  config
 
from  beets  import  plugins



Clone # 1503
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 23
Source file "../tests/beets/ui/migrate.py"
The first line is 25
import  beets.autotag.hooks import  re
 
import  beets import  beets
from  beets  import  util from  beets  import  util
from  beets  import  config
 
from  beets  import  ui



Clone # 1504
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 17
Source file "../tests/beets/util/artresizer.py"
The first line is 19
import  time import  subprocess
import  os import  os
from  collections  import  defaultdict from  tempfile  import  NamedTemporaryFile
import  threading import  logging



Clone # 1505
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 17
Source file "../tests/beets/plugins.py"
The first line is 17
import  time import  logging
import  os import  traceback
from  collections  import  defaultdict from  collections  import  defaultdict
 
import  threading import  beets



Clone # 1506
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 21
Source file "../tests/beets/plugins.py"
The first line is 17
import  shutil import  logging
import  fnmatch import  traceback
from  collections  import  defaultdict from  collections  import  defaultdict
 
import  traceback import  beets



Clone # 1507
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 19
Source file "../tests/beets/plugins.py"
The first line is 17
import  re import  logging
import  traceback import  traceback
from  urlparse  import  urljoin
 
from  collections  import  defaultdict
 
import  beets.autotag.hooks import  beets



Clone # 1508
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 31
Source file "../tests/fig/fig/packages/six.py"
The first line is 22
import  ast import  operator
import  dis import  sys
import  types
 
import  types
 
SYMBOL_DELIM  =  u'$' __author__  =  "Benjamin  Peterson  <benjamin@python.org>"



Clone # 1509
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/__init__.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 29
import  os import  re
import  logging import  struct
import  re
 
import  traceback
 
from  beets  import  library,  mediafile,  config from  beets  import  library



Clone # 1510
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 24
Source file "../tests/beets/autotag/__init__.py"
The first line is 17
import  itertools import  os
import  re
 
import  logging
import  beets import  re
 
from  beets  import  util from  beets  import  library,  mediafile,  config



Clone # 1511
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/runtests.py"
The first line is 2
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 5
import  sys import  datetime
import  os import  os
import  shutil
 
import  sys
 
from  django.conf  import  settings,  global_settings from  django.contrib.admin.sites  import  AdminSite



Clone # 1512
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 5
Source file "../tests/beets/ui/__init__.py"
The first line is 22
import  datetime import  optparse
import  os import  textwrap
import  sys
 
import  sys
from  django.contrib.admin.sites  import  AdminSite from  difflib  import  SequenceMatcher



Clone # 1513
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 16
Source file "../tests/beets/util/artresizer.py"
The first line is 18
import  fileinput import  urllib
import  json import  subprocess
import  os
 
import  os
from  fig.packages  import  six
 
from  tempfile  import  NamedTemporaryFile



Clone # 1514
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 5
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/jenkins/toxhelper.py"
The first line is 10
import  datetime import  sys
 
import  os import  os
import  sys
 
import  pytest
 
from  django.contrib.admin.sites  import  AdminSite from  coverage  import  coverage
 
 



Clone # 1515
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/runtests.py"
The first line is 2
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/jenkins/toxhelper.py"
The first line is 10
import  sys import  sys
 
import  os import  os
import  shutil
 
import  pytest
 
from  django.conf  import  settings,  global_settings from  coverage  import  coverage
 
 



Clone # 1516
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 5
Source file "../tests/fig/fig/service.py"
The first line is 5
import  datetime import  re
import  os import  os
import  sys
 
import  sys
from  django.contrib.admin.sites  import  AdminSite from  .container  import  Container
 



Clone # 1517
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/__init__.py"
The first line is 19
import  locale import  sys
import  optparse import  re
import  textwrap import  shutil
import  sys import  fnmatch



Clone # 1518
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/autotag/mb.py"
The first line is 17
import  locale import  logging
import  optparse import  musicbrainzngs
import  textwrap import  re
import  sys import  traceback



Clone # 1519
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/autotag/mb.py"
The first line is 17
import  sys import  logging
import  re import  musicbrainzngs
import  shutil import  re
import  fnmatch import  traceback



Clone # 1520
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
import  locale import  logging
import  optparse import  os
import  textwrap import  re
import  sys import  yaml



Clone # 1521
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/importer.py"
The first line is 20
import  shlex import  os
import  unicodedata import  logging
import  traceback import  pickle
import  time import  itertools



Clone # 1522
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/importer.py"
The first line is 20
import  errno import  os
import  re import  logging
import  struct import  pickle
import  traceback
 
import  itertools



Clone # 1523
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/importer.py"
The first line is 20
import  shlex import  os
import  struct
 
import  logging
import  requests import  pickle
import  requests.exceptions import  itertools



Clone # 1524
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/importer.py"
The first line is 20
import  time import  os
import  itertools import  logging
import  re
 
import  pickle
import  beets import  itertools



Clone # 1525
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  base64 import  threading
import  fileinput import  sqlite3
import  json import  contextlib
 
import  os
 
import  beets



Clone # 1526
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  base64 import  errno
import  fileinput import  re
import  json import  struct
import  os
 
import  traceback
 



Clone # 1527
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  base64 import  time
import  fileinput import  itertools
import  json import  re
 
import  os
 
import  beets



Clone # 1528
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/importer.py"
The first line is 20
import  base64 import  os
import  fileinput import  logging
import  json import  pickle
import  os
 
import  itertools



Clone # 1529
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 21
import  base64 import  shlex
import  fileinput import  unicodedata
import  json import  traceback
import  os
 
import  time



Clone # 1530
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  threading import  errno
import  sqlite3 import  re
import  contextlib
 
import  struct
import  beets import  traceback
 



Clone # 1531
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 21
import  threading import  shlex
import  sqlite3 import  unicodedata
import  contextlib
 
import  traceback
import  beets import  time



Clone # 1532
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  threading import  shlex
import  sqlite3 import  struct
 
import  contextlib
 
import  requests
import  beets import  requests.exceptions



Clone # 1533
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/service.py"
The first line is 4
import  sys import  logging
import  re import  re
import  shutil import  os
import  fnmatch import  sys



Clone # 1534
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/service.py"
The first line is 4
import  logging import  logging
import  musicbrainzngs import  re
import  re import  os
import  traceback import  sys



Clone # 1535
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/service.py"
The first line is 4
import  logging import  logging
import  os import  re
import  re import  os
import  yaml import  sys



Clone # 1536
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
import  locale import  os
import  optparse import  socket
import  textwrap import  subprocess
import  sys import  platform



Clone # 1537
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
import  logging import  os
import  musicbrainzngs import  socket
import  re import  subprocess
import  traceback import  platform



Clone # 1538
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  sys import  io
import  re import  tarfile
import  shutil import  tempfile
 
import  fnmatch import  requests



Clone # 1539
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  locale import  io
import  optparse import  tarfile
import  textwrap import  tempfile
 
import  sys import  requests



Clone # 1540
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  logging import  io
import  musicbrainzngs import  tarfile
import  re import  tempfile
 
import  traceback import  requests



Clone # 1541
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  logging import  io
import  os import  tarfile
import  re import  tempfile
 
import  yaml import  requests



Clone # 1542
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  sys import  threading
import  re import  sqlite3
import  shutil import  contextlib
 
import  fnmatch import  beets



Clone # 1543
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  sys import  base64
import  re import  fileinput
import  shutil import  json
import  fnmatch import  os
 



Clone # 1544
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  locale import  errno
import  optparse import  re
import  textwrap import  struct
import  sys import  traceback
 



Clone # 1545
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  locale import  time
import  optparse import  itertools
import  textwrap import  re
 
import  sys import  beets



Clone # 1546
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 21
import  locale import  shlex
import  optparse import  unicodedata
import  textwrap import  traceback
import  sys import  time



Clone # 1547
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  locale import  base64
import  optparse import  fileinput
import  textwrap import  json
import  sys import  os
 



Clone # 1548
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  locale import  shlex
import  optparse import  struct
 
import  textwrap import  requests
import  sys import  requests.exceptions



Clone # 1549
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  logging import  threading
import  musicbrainzngs import  sqlite3
import  re import  contextlib
 
import  traceback import  beets



Clone # 1550
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/importer.py"
The first line is 20
import  logging import  os
import  musicbrainzngs import  logging
import  re import  pickle
import  traceback import  itertools



Clone # 1551
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 21
import  logging import  shlex
import  musicbrainzngs import  unicodedata
import  re import  traceback
import  traceback import  time



Clone # 1552
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  logging import  base64
import  musicbrainzngs import  fileinput
import  re import  json
import  traceback import  os
 



Clone # 1553
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  logging import  shlex
import  musicbrainzngs import  struct
 
import  re import  requests
import  traceback import  requests.exceptions



Clone # 1554
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  logging import  threading
import  os import  sqlite3
import  re import  contextlib
 
import  yaml import  beets



Clone # 1555
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/importer.py"
The first line is 20
import  logging import  os
import  os import  logging
import  re import  pickle
import  yaml import  itertools



Clone # 1556
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  logging import  base64
import  os import  fileinput
import  re import  json
import  yaml import  os
 



Clone # 1557
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
import  logging import  os
import  re import  socket
import  os import  subprocess
import  sys import  platform



Clone # 1558
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  logging import  io
import  re import  tarfile
import  os import  tempfile
 
import  sys import  requests



Clone # 1559
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  logging import  errno
import  re import  re
import  os import  struct
import  sys import  traceback
 



Clone # 1560
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  logging import  time
import  re import  itertools
import  os import  re
 
import  sys import  beets



Clone # 1561
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 21
import  logging import  shlex
import  re import  unicodedata
import  os import  traceback
import  sys import  time



Clone # 1562
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  logging import  base64
import  re import  fileinput
import  os import  json
import  sys import  os
 



Clone # 1563
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  logging import  shlex
import  re import  struct
 
import  os import  requests
import  sys import  requests.exceptions



Clone # 1564
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  os import  io
import  socket import  tarfile
import  subprocess import  tempfile
 
import  platform import  requests



Clone # 1565
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  os import  threading
import  socket import  sqlite3
import  subprocess import  contextlib
 
import  platform import  beets



Clone # 1566
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/importer.py"
The first line is 20
import  os import  os
import  socket import  logging
import  subprocess import  pickle
import  platform import  itertools



Clone # 1567
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  os import  base64
import  socket import  fileinput
import  subprocess import  json
import  platform import  os
 



Clone # 1568
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  io import  threading
import  tarfile import  sqlite3
import  tempfile
 
import  contextlib
 
import  requests import  beets



Clone # 1569
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  io import  errno
import  tarfile import  re
import  tempfile
 
import  struct
import  requests import  traceback
 



Clone # 1570
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  io import  time
import  tarfile import  itertools
import  tempfile
 
import  re
 
import  requests import  beets



Clone # 1571
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/importer.py"
The first line is 20
import  io import  os
import  tarfile import  logging
import  tempfile
 
import  pickle
import  requests import  itertools



Clone # 1572
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 21
import  io import  shlex
import  tarfile import  unicodedata
import  tempfile
 
import  traceback
import  requests import  time



Clone # 1573
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/__init__.py"
The first line is 19
import  re import  sys
import  ast import  re
import  dis import  shutil
import  types
 
import  fnmatch



Clone # 1574
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  re import  errno
import  ast import  re
import  dis import  struct
import  types
 
import  traceback
 



Clone # 1575
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  re import  time
import  ast import  itertools
import  dis import  re
 
import  types
 
import  beets



Clone # 1576
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/autotag/mb.py"
The first line is 17
import  re import  logging
import  ast import  musicbrainzngs
import  dis import  re
import  types
 
import  traceback



Clone # 1577
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/library.py"
The first line is 21
import  re import  shlex
import  ast import  unicodedata
import  dis import  traceback
import  types
 
import  time



Clone # 1578
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
import  re import  logging
import  ast import  os
import  dis import  re
import  types
 
import  yaml



Clone # 1579
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
import  re import  os
import  ast import  socket
import  dis import  subprocess
import  types
 
import  platform



Clone # 1580
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  re import  io
import  ast import  tarfile
import  dis import  tempfile
 
import  types
 
import  requests



Clone # 1581
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  re import  base64
import  ast import  fileinput
import  dis import  json
import  types
 
import  os
 



Clone # 1582
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  re import  shlex
import  ast import  struct
 
import  dis import  requests
import  types
 
import  requests.exceptions



Clone # 1583
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  re import  errno
import  ast import  traceback
import  dis import  time
import  types
 
import  collections
 
 



Clone # 1584
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  re import  time
import  ast import  itertools
import  dis import  codecs
import  types
 
import  platform
 



Clone # 1585
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  re import  types
import  ast import  errno
import  dis import  traceback
import  types
 
import  time



Clone # 1586
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  re import  sys
import  ast import  types
import  dis import  errno
import  types
 
import  traceback



Clone # 1587
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  re import  select
import  ast import  sys
import  dis import  types
import  types
 
import  errno



Clone # 1588
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  re import  socket
import  ast import  select
import  dis import  sys
import  types
 
import  types



Clone # 1589
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/confit.py"
The first line is 19
import  re import  os
import  ast import  pkgutil
import  dis import  sys
import  types
 
import  yaml



Clone # 1590
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  re import  sqlite3
import  ast import  errno
import  dis import  re
import  types
 
import  struct



Clone # 1591
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  re import  os
import  ast import  time
import  dis import  itertools
import  types
 
import  codecs



Clone # 1592
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  re import  logging
import  ast import  time
import  dis import  itertools
import  types
 
import  re
 



Clone # 1593
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  re import  yaml
import  ast import  logging
import  dis import  time
import  types
 
import  itertools



Clone # 1594
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  re import  codecs
import  ast import  yaml
import  dis import  logging
import  types
 
import  time



Clone # 1595
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  re import  ConfigParser
import  ast import  codecs
import  dis import  yaml
import  types
 
import  logging



Clone # 1596
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  re import  os
import  ast import  ConfigParser
import  dis import  codecs
import  types
 
import  yaml



Clone # 1597
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/library.py"
The first line is 20
import  re import  logging
import  ast import  shlex
import  dis import  unicodedata
import  types
 
import  traceback



Clone # 1598
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/library.py"
The first line is 19
import  re import  sys
import  ast import  logging
import  dis import  shlex
import  types
 
import  unicodedata



Clone # 1599
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/library.py"
The first line is 18
import  re import  re
import  ast import  sys
import  dis import  logging
import  types
 
import  shlex



Clone # 1600
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/library.py"
The first line is 17
import  re import  os
import  ast import  re
import  dis import  sys
import  types
 
import  logging



Clone # 1601
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  re import  os
import  ast import  termios
import  dis import  threading
import  types
 
import  errno
 



Clone # 1602
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  re import  fcntl
import  ast import  os
import  dis import  termios
import  types
 
import  threading



Clone # 1603
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  re import  tty
import  ast import  fcntl
import  dis import  os
import  types
 
import  termios



Clone # 1604
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  re import  re
import  ast import  shlex
import  dis import  struct
 
import  types
 
import  requests



Clone # 1605
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  re import  json
import  ast import  re
import  dis import  shlex
import  types
 
import  struct
 



Clone # 1606
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/beets/util/confit.py"
The first line is 20
import  re import  pkgutil
import  ast import  sys
import  dis import  yaml
import  types
 
import  types



Clone # 1607
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/functemplate.py"
The first line is 30
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  re import  termios
import  ast import  threading
import  dis import  errno
 
import  types
 
import  logging



Clone # 1608
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  threading import  errno
import  sqlite3 import  traceback
import  contextlib
 
import  time
import  beets import  collections
 
 



Clone # 1609
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  locale import  errno
import  optparse import  traceback
import  textwrap import  time
import  sys import  collections
 
 



Clone # 1610
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  logging import  errno
import  musicbrainzngs import  traceback
import  re import  time
import  traceback import  collections
 
 



Clone # 1611
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  os import  errno
import  logging import  traceback
import  pickle import  time
import  itertools import  collections
 
 



Clone # 1612
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  io import  errno
import  tarfile import  traceback
import  tempfile
 
import  time
import  requests import  collections
 
 



Clone # 1613
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  base64 import  errno
import  fileinput import  traceback
import  json import  time
import  os
 
import  collections
 
 



Clone # 1614
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  logging import  errno
import  re import  traceback
import  os import  time
import  sys import  collections
 
 



Clone # 1615
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  threading import  time
import  sqlite3 import  itertools
import  contextlib
 
import  codecs
import  beets import  platform
 



Clone # 1616
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  threading import  types
import  sqlite3 import  errno
import  contextlib
 
import  traceback
import  beets import  time



Clone # 1617
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  threading import  sys
import  sqlite3 import  types
import  contextlib
 
import  errno
import  beets import  traceback



Clone # 1618
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  threading import  select
import  sqlite3 import  sys
import  contextlib
 
import  types
import  beets import  errno



Clone # 1619
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  threading import  socket
import  sqlite3 import  select
import  contextlib
 
import  sys
import  beets import  types



Clone # 1620
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 19
import  threading import  os
import  sqlite3 import  pkgutil
import  contextlib
 
import  sys
import  beets import  yaml



Clone # 1621
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  threading import  sqlite3
import  sqlite3 import  errno
import  contextlib
 
import  re
import  beets import  struct



Clone # 1622
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  threading import  os
import  sqlite3 import  time
import  contextlib
 
import  itertools
import  beets import  codecs



Clone # 1623
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  threading import  logging
import  sqlite3 import  time
import  contextlib
 
import  itertools
import  beets import  re
 



Clone # 1624
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  threading import  yaml
import  sqlite3 import  logging
import  contextlib
 
import  time
import  beets import  itertools



Clone # 1625
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  threading import  codecs
import  sqlite3 import  yaml
import  contextlib
 
import  logging
import  beets import  time



Clone # 1626
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  threading import  ConfigParser
import  sqlite3 import  codecs
import  contextlib
 
import  yaml
import  beets import  logging



Clone # 1627
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  threading import  os
import  sqlite3 import  ConfigParser
import  contextlib
 
import  codecs
import  beets import  yaml



Clone # 1628
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 20
import  threading import  logging
import  sqlite3 import  shlex
import  contextlib
 
import  unicodedata
import  beets import  traceback



Clone # 1629
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 19
import  threading import  sys
import  sqlite3 import  logging
import  contextlib
 
import  shlex
import  beets import  unicodedata



Clone # 1630
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 18
import  threading import  re
import  sqlite3 import  sys
import  contextlib
 
import  logging
import  beets import  shlex



Clone # 1631
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 17
import  threading import  os
import  sqlite3 import  re
import  contextlib
 
import  sys
import  beets import  logging



Clone # 1632
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  threading import  os
import  sqlite3 import  termios
import  contextlib
 
import  threading
import  beets import  errno
 



Clone # 1633
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  threading import  fcntl
import  sqlite3 import  os
import  contextlib
 
import  termios
import  beets import  threading



Clone # 1634
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  threading import  tty
import  sqlite3 import  fcntl
import  contextlib
 
import  os
import  beets import  termios



Clone # 1635
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  threading import  re
import  sqlite3 import  shlex
import  contextlib
 
import  struct
 
import  beets import  requests



Clone # 1636
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  threading import  json
import  sqlite3 import  re
import  contextlib
 
import  shlex
import  beets import  struct
 



Clone # 1637
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  sys import  socket
import  re import  select
import  shutil import  sys
import  fnmatch import  types



Clone # 1638
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  sys import  os
import  re import  sys
import  shutil import  re
import  fnmatch import  shutil



Clone # 1639
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/util/confit.py"
The first line is 18
import  sys import  platform
import  re import  os
import  shutil import  pkgutil
import  fnmatch import  sys



Clone # 1640
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  sys import  logging
import  re import  sqlite3
import  shutil import  errno
import  fnmatch import  re



Clone # 1641
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  sys import  logging
import  re import  os
import  shutil import  time
import  fnmatch import  itertools



Clone # 1642
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  sys import  os
import  re import  ConfigParser
import  shutil import  codecs
import  fnmatch import  yaml



Clone # 1643
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/beets/library.py"
The first line is 17
import  sys import  os
import  re import  re
import  shutil import  sys
import  fnmatch import  logging



Clone # 1644
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  sys import  errno
import  re import  logging
import  shutil import  os
import  fnmatch import  re



Clone # 1645
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  sys import  datetime
import  re import  os
import  shutil import  socket
import  fnmatch import  subprocess



Clone # 1646
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  sys import  sys
import  re import  tty
import  shutil import  fcntl
import  fnmatch import  os



Clone # 1647
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 19
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  sys import  json
import  re import  re
import  shutil import  shlex
import  fnmatch import  struct
 



Clone # 1648
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  errno import  socket
import  re import  select
import  struct import  sys
import  traceback
 
import  types



Clone # 1649
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  errno import  os
import  re import  sys
import  struct import  re
import  traceback
 
import  shutil



Clone # 1650
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/util/confit.py"
The first line is 18
import  errno import  platform
import  re import  os
import  struct import  pkgutil
import  traceback
 
import  sys



Clone # 1651
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  errno import  logging
import  re import  sqlite3
import  struct import  errno
import  traceback
 
import  re



Clone # 1652
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  errno import  logging
import  re import  os
import  struct import  time
import  traceback
 
import  itertools



Clone # 1653
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  errno import  os
import  re import  ConfigParser
import  struct import  codecs
import  traceback
 
import  yaml



Clone # 1654
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/beets/library.py"
The first line is 17
import  errno import  os
import  re import  re
import  struct import  sys
import  traceback
 
import  logging



Clone # 1655
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  errno import  errno
import  re import  logging
import  struct import  os
import  traceback
 
import  re



Clone # 1656
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  errno import  datetime
import  re import  os
import  struct import  socket
import  traceback
 
import  subprocess



Clone # 1657
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  errno import  sys
import  re import  tty
import  struct import  fcntl
import  traceback
 
import  os



Clone # 1658
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 28
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  errno import  json
import  re import  re
import  struct import  shlex
import  traceback
 
import  struct
 



Clone # 1659
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  locale import  time
import  optparse import  itertools
import  textwrap import  codecs
import  sys import  platform
 



Clone # 1660
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  locale import  types
import  optparse import  errno
import  textwrap import  traceback
import  sys import  time



Clone # 1661
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  locale import  sys
import  optparse import  types
import  textwrap import  errno
import  sys import  traceback



Clone # 1662
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  locale import  select
import  optparse import  sys
import  textwrap import  types
import  sys import  errno



Clone # 1663
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  locale import  socket
import  optparse import  select
import  textwrap import  sys
import  sys import  types



Clone # 1664
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/confit.py"
The first line is 19
import  locale import  os
import  optparse import  pkgutil
import  textwrap import  sys
import  sys import  yaml



Clone # 1665
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  locale import  sqlite3
import  optparse import  errno
import  textwrap import  re
import  sys import  struct



Clone # 1666
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  locale import  os
import  optparse import  time
import  textwrap import  itertools
import  sys import  codecs



Clone # 1667
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  locale import  logging
import  optparse import  time
import  textwrap import  itertools
import  sys import  re
 



Clone # 1668
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  locale import  yaml
import  optparse import  logging
import  textwrap import  time
import  sys import  itertools



Clone # 1669
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  locale import  codecs
import  optparse import  yaml
import  textwrap import  logging
import  sys import  time



Clone # 1670
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  locale import  ConfigParser
import  optparse import  codecs
import  textwrap import  yaml
import  sys import  logging



Clone # 1671
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  locale import  os
import  optparse import  ConfigParser
import  textwrap import  codecs
import  sys import  yaml



Clone # 1672
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 20
import  locale import  logging
import  optparse import  shlex
import  textwrap import  unicodedata
import  sys import  traceback



Clone # 1673
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 19
import  locale import  sys
import  optparse import  logging
import  textwrap import  shlex
import  sys import  unicodedata



Clone # 1674
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 18
import  locale import  re
import  optparse import  sys
import  textwrap import  logging
import  sys import  shlex



Clone # 1675
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 17
import  locale import  os
import  optparse import  re
import  textwrap import  sys
import  sys import  logging



Clone # 1676
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  locale import  os
import  optparse import  termios
import  textwrap import  threading
import  sys import  errno
 



Clone # 1677
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  locale import  fcntl
import  optparse import  os
import  textwrap import  termios
import  sys import  threading



Clone # 1678
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  locale import  tty
import  optparse import  fcntl
import  textwrap import  os
import  sys import  termios



Clone # 1679
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  locale import  re
import  optparse import  shlex
import  textwrap import  struct
 
import  sys import  requests



Clone # 1680
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  locale import  json
import  optparse import  re
import  textwrap import  shlex
import  sys import  struct
 



Clone # 1681
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  time import  socket
import  itertools import  select
import  re
 
import  sys
import  beets import  types



Clone # 1682
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  time import  os
import  itertools import  sys
import  re
 
import  re
import  beets import  shutil



Clone # 1683
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/util/confit.py"
The first line is 18
import  time import  platform
import  itertools import  os
import  re
 
import  pkgutil
import  beets import  sys



Clone # 1684
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  time import  logging
import  itertools import  sqlite3
import  re
 
import  errno
import  beets import  re



Clone # 1685
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  time import  logging
import  itertools import  os
import  re
 
import  time
import  beets import  itertools



Clone # 1686
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  time import  os
import  itertools import  ConfigParser
import  re
 
import  codecs
import  beets import  yaml



Clone # 1687
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/beets/library.py"
The first line is 17
import  time import  os
import  itertools import  re
import  re
 
import  sys
import  beets import  logging



Clone # 1688
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  time import  errno
import  itertools import  logging
import  re
 
import  os
import  beets import  re



Clone # 1689
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  time import  datetime
import  itertools import  os
import  re
 
import  socket
import  beets import  subprocess



Clone # 1690
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  time import  sys
import  itertools import  tty
import  re
 
import  fcntl
import  beets import  os



Clone # 1691
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 23
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  time import  json
import  itertools import  re
import  re
 
import  shlex
import  beets import  struct
 



Clone # 1692
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  logging import  time
import  musicbrainzngs import  itertools
import  re import  codecs
import  traceback import  platform
 



Clone # 1693
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  logging import  types
import  musicbrainzngs import  errno
import  re import  traceback
import  traceback import  time



Clone # 1694
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  logging import  sys
import  musicbrainzngs import  types
import  re import  errno
import  traceback import  traceback



Clone # 1695
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  logging import  select
import  musicbrainzngs import  sys
import  re import  types
import  traceback import  errno



Clone # 1696
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  logging import  socket
import  musicbrainzngs import  select
import  re import  sys
import  traceback import  types



Clone # 1697
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  logging import  os
import  musicbrainzngs import  sys
import  re import  re
import  traceback import  shutil



Clone # 1698
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 19
import  logging import  os
import  musicbrainzngs import  pkgutil
import  re import  sys
import  traceback import  yaml



Clone # 1699
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 18
import  logging import  platform
import  musicbrainzngs import  os
import  re import  pkgutil
import  traceback import  sys



Clone # 1700
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  logging import  sqlite3
import  musicbrainzngs import  errno
import  re import  re
import  traceback import  struct



Clone # 1701
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  logging import  logging
import  musicbrainzngs import  sqlite3
import  re import  errno
import  traceback import  re



Clone # 1702
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  logging import  os
import  musicbrainzngs import  time
import  re import  itertools
import  traceback import  codecs



Clone # 1703
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  logging import  logging
import  musicbrainzngs import  os
import  re import  time
import  traceback import  itertools



Clone # 1704
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  logging import  logging
import  musicbrainzngs import  time
import  re import  itertools
import  traceback import  re
 



Clone # 1705
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  logging import  yaml
import  musicbrainzngs import  logging
import  re import  time
import  traceback import  itertools



Clone # 1706
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  logging import  codecs
import  musicbrainzngs import  yaml
import  re import  logging
import  traceback import  time



Clone # 1707
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  logging import  ConfigParser
import  musicbrainzngs import  codecs
import  re import  yaml
import  traceback import  logging



Clone # 1708
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  logging import  os
import  musicbrainzngs import  ConfigParser
import  re import  codecs
import  traceback import  yaml



Clone # 1709
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 20
import  logging import  logging
import  musicbrainzngs import  shlex
import  re import  unicodedata
import  traceback import  traceback



Clone # 1710
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 19
import  logging import  sys
import  musicbrainzngs import  logging
import  re import  shlex
import  traceback import  unicodedata



Clone # 1711
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 18
import  logging import  re
import  musicbrainzngs import  sys
import  re import  logging
import  traceback import  shlex



Clone # 1712
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 17
import  logging import  os
import  musicbrainzngs import  re
import  re import  sys
import  traceback import  logging



Clone # 1713
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  logging import  errno
import  musicbrainzngs import  logging
import  re import  os
import  traceback import  re



Clone # 1714
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  logging import  datetime
import  musicbrainzngs import  os
import  re import  socket
import  traceback import  subprocess



Clone # 1715
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  logging import  os
import  musicbrainzngs import  termios
import  re import  threading
import  traceback import  errno
 



Clone # 1716
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  logging import  fcntl
import  musicbrainzngs import  os
import  re import  termios
import  traceback import  threading



Clone # 1717
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  logging import  tty
import  musicbrainzngs import  fcntl
import  re import  os
import  traceback import  termios



Clone # 1718
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  logging import  sys
import  musicbrainzngs import  tty
import  re import  fcntl
import  traceback import  os



Clone # 1719
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  logging import  re
import  musicbrainzngs import  shlex
import  re import  struct
 
import  traceback import  requests



Clone # 1720
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  logging import  json
import  musicbrainzngs import  re
import  re import  shlex
import  traceback import  struct
 



Clone # 1721
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  os import  time
import  logging import  itertools
import  pickle import  codecs
import  itertools import  platform
 



Clone # 1722
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  os import  types
import  logging import  errno
import  pickle import  traceback
import  itertools import  time



Clone # 1723
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  os import  sys
import  logging import  types
import  pickle import  errno
import  itertools import  traceback



Clone # 1724
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  os import  select
import  logging import  sys
import  pickle import  types
import  itertools import  errno



Clone # 1725
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  os import  socket
import  logging import  select
import  pickle import  sys
import  itertools import  types



Clone # 1726
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 19
import  os import  os
import  logging import  pkgutil
import  pickle import  sys
import  itertools import  yaml



Clone # 1727
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  os import  sqlite3
import  logging import  errno
import  pickle import  re
import  itertools import  struct



Clone # 1728
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  os import  os
import  logging import  time
import  pickle import  itertools
import  itertools import  codecs



Clone # 1729
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  os import  logging
import  logging import  time
import  pickle import  itertools
import  itertools import  re
 



Clone # 1730
Distance between two fragments = 2
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  os import  yaml
import  logging import  logging
import  pickle import  time
import  itertools import  itertools



Clone # 1731
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  os import  codecs
import  logging import  yaml
import  pickle import  logging
import  itertools import  time



Clone # 1732
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  os import  ConfigParser
import  logging import  codecs
import  pickle import  yaml
import  itertools import  logging



Clone # 1733
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  os import  os
import  logging import  ConfigParser
import  pickle import  codecs
import  itertools import  yaml



Clone # 1734
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 20
import  os import  logging
import  logging import  shlex
import  pickle import  unicodedata
import  itertools import  traceback



Clone # 1735
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 19
import  os import  sys
import  logging import  logging
import  pickle import  shlex
import  itertools import  unicodedata



Clone # 1736
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 18
import  os import  re
import  logging import  sys
import  pickle import  logging
import  itertools import  shlex



Clone # 1737
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/library.py"
The first line is 17
import  os import  os
import  logging import  re
import  pickle import  sys
import  itertools import  logging



Clone # 1738
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  os import  os
import  logging import  termios
import  pickle import  threading
import  itertools import  errno
 



Clone # 1739
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  os import  fcntl
import  logging import  os
import  pickle import  termios
import  itertools import  threading



Clone # 1740
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  os import  tty
import  logging import  fcntl
import  pickle import  os
import  itertools import  termios



Clone # 1741
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  os import  re
import  logging import  shlex
import  pickle import  struct
 
import  itertools import  requests



Clone # 1742
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  os import  json
import  logging import  re
import  pickle import  shlex
import  itertools import  struct
 



Clone # 1743
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  shlex import  socket
import  unicodedata import  select
import  traceback import  sys
import  time import  types



Clone # 1744
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  shlex import  os
import  unicodedata import  sys
import  traceback import  re
import  time import  shutil



Clone # 1745
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/util/confit.py"
The first line is 18
import  shlex import  platform
import  unicodedata import  os
import  traceback import  pkgutil
import  time import  sys



Clone # 1746
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  shlex import  logging
import  unicodedata import  sqlite3
import  traceback import  errno
import  time import  re



Clone # 1747
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  shlex import  logging
import  unicodedata import  os
import  traceback import  time
import  time import  itertools



Clone # 1748
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  shlex import  os
import  unicodedata import  ConfigParser
import  traceback import  codecs
import  time import  yaml



Clone # 1749
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/beets/library.py"
The first line is 17
import  shlex import  os
import  unicodedata import  re
import  traceback import  sys
import  time import  logging



Clone # 1750
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  shlex import  errno
import  unicodedata import  logging
import  traceback import  os
import  time import  re



Clone # 1751
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  shlex import  datetime
import  unicodedata import  os
import  traceback import  socket
import  time import  subprocess



Clone # 1752
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  shlex import  sys
import  unicodedata import  tty
import  traceback import  fcntl
import  time import  os



Clone # 1753
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 21
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  shlex import  json
import  unicodedata import  re
import  traceback import  shlex
import  time import  struct
 



Clone # 1754
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  logging import  socket
import  os import  select
import  re import  sys
import  yaml import  types



Clone # 1755
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  logging import  os
import  os import  sys
import  re import  re
import  yaml import  shutil



Clone # 1756
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/util/confit.py"
The first line is 18
import  logging import  platform
import  os import  os
import  re import  pkgutil
import  yaml import  sys



Clone # 1757
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  logging import  logging
import  os import  sqlite3
import  re import  errno
import  yaml import  re



Clone # 1758
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  logging import  logging
import  os import  os
import  re import  time
import  yaml import  itertools



Clone # 1759
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  logging import  os
import  os import  ConfigParser
import  re import  codecs
import  yaml import  yaml



Clone # 1760
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/beets/library.py"
The first line is 17
import  logging import  os
import  os import  re
import  re import  sys
import  yaml import  logging



Clone # 1761
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  logging import  errno
import  os import  logging
import  re import  os
import  yaml import  re



Clone # 1762
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  logging import  datetime
import  os import  os
import  re import  socket
import  yaml import  subprocess



Clone # 1763
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  logging import  sys
import  os import  tty
import  re import  fcntl
import  yaml import  os



Clone # 1764
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  logging import  json
import  os import  re
import  re import  shlex
import  yaml import  struct
 



Clone # 1765
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  os import  socket
import  socket import  select
import  subprocess import  sys
import  platform import  types



Clone # 1766
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  os import  os
import  socket import  sys
import  subprocess import  re
import  platform import  shutil



Clone # 1767
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/util/confit.py"
The first line is 18
import  os import  platform
import  socket import  os
import  subprocess import  pkgutil
import  platform import  sys



Clone # 1768
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  os import  logging
import  socket import  sqlite3
import  subprocess import  errno
import  platform import  re



Clone # 1769
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  os import  logging
import  socket import  os
import  subprocess import  time
import  platform import  itertools



Clone # 1770
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  os import  os
import  socket import  ConfigParser
import  subprocess import  codecs
import  platform import  yaml



Clone # 1771
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/beets/library.py"
The first line is 17
import  os import  os
import  socket import  re
import  subprocess import  sys
import  platform import  logging



Clone # 1772
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  os import  errno
import  socket import  logging
import  subprocess import  os
import  platform import  re



Clone # 1773
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  os import  datetime
import  socket import  os
import  subprocess import  socket
import  platform import  subprocess



Clone # 1774
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  os import  sys
import  socket import  tty
import  subprocess import  fcntl
import  platform import  os



Clone # 1775
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  os import  json
import  socket import  re
import  subprocess import  shlex
import  platform import  struct
 



Clone # 1776
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  io import  time
import  tarfile import  itertools
import  tempfile
 
import  codecs
import  requests import  platform
 



Clone # 1777
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  io import  types
import  tarfile import  errno
import  tempfile
 
import  traceback
import  requests import  time



Clone # 1778
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  io import  sys
import  tarfile import  types
import  tempfile
 
import  errno
import  requests import  traceback



Clone # 1779
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  io import  select
import  tarfile import  sys
import  tempfile
 
import  types
import  requests import  errno



Clone # 1780
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  io import  socket
import  tarfile import  select
import  tempfile
 
import  sys
import  requests import  types



Clone # 1781
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  io import  os
import  tarfile import  sys
import  tempfile
 
import  re
import  requests import  shutil



Clone # 1782
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 19
import  io import  os
import  tarfile import  pkgutil
import  tempfile
 
import  sys
import  requests import  yaml



Clone # 1783
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 18
import  io import  platform
import  tarfile import  os
import  tempfile
 
import  pkgutil
import  requests import  sys



Clone # 1784
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  io import  sqlite3
import  tarfile import  errno
import  tempfile
 
import  re
import  requests import  struct



Clone # 1785
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  io import  logging
import  tarfile import  sqlite3
import  tempfile
 
import  errno
import  requests import  re



Clone # 1786
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  io import  os
import  tarfile import  time
import  tempfile
 
import  itertools
import  requests import  codecs



Clone # 1787
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  io import  logging
import  tarfile import  os
import  tempfile
 
import  time
import  requests import  itertools



Clone # 1788
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  io import  logging
import  tarfile import  time
import  tempfile
 
import  itertools
import  requests import  re
 



Clone # 1789
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  io import  yaml
import  tarfile import  logging
import  tempfile
 
import  time
import  requests import  itertools



Clone # 1790
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  io import  codecs
import  tarfile import  yaml
import  tempfile
 
import  logging
import  requests import  time



Clone # 1791
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  io import  ConfigParser
import  tarfile import  codecs
import  tempfile
 
import  yaml
import  requests import  logging



Clone # 1792
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  io import  os
import  tarfile import  ConfigParser
import  tempfile
 
import  codecs
import  requests import  yaml



Clone # 1793
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 20
import  io import  logging
import  tarfile import  shlex
import  tempfile
 
import  unicodedata
import  requests import  traceback



Clone # 1794
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 19
import  io import  sys
import  tarfile import  logging
import  tempfile
 
import  shlex
import  requests import  unicodedata



Clone # 1795
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 18
import  io import  re
import  tarfile import  sys
import  tempfile
 
import  logging
import  requests import  shlex



Clone # 1796
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 17
import  io import  os
import  tarfile import  re
import  tempfile
 
import  sys
import  requests import  logging



Clone # 1797
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  io import  errno
import  tarfile import  logging
import  tempfile
 
import  os
import  requests import  re



Clone # 1798
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  io import  datetime
import  tarfile import  os
import  tempfile
 
import  socket
import  requests import  subprocess



Clone # 1799
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  io import  os
import  tarfile import  termios
import  tempfile
 
import  threading
import  requests import  errno
 



Clone # 1800
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  io import  fcntl
import  tarfile import  os
import  tempfile
 
import  termios
import  requests import  threading



Clone # 1801
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  io import  tty
import  tarfile import  fcntl
import  tempfile
 
import  os
import  requests import  termios



Clone # 1802
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  io import  sys
import  tarfile import  tty
import  tempfile
 
import  fcntl
import  requests import  os



Clone # 1803
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  io import  re
import  tarfile import  shlex
import  tempfile
 
import  struct
 
import  requests import  requests



Clone # 1804
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  io import  json
import  tarfile import  re
import  tempfile
 
import  shlex
import  requests import  struct
 



Clone # 1805
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  base64 import  time
import  fileinput import  itertools
import  json import  codecs
import  os
 
import  platform
 



Clone # 1806
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  base64 import  types
import  fileinput import  errno
import  json import  traceback
import  os
 
import  time



Clone # 1807
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  base64 import  sys
import  fileinput import  types
import  json import  errno
import  os
 
import  traceback



Clone # 1808
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  base64 import  select
import  fileinput import  sys
import  json import  types
import  os
 
import  errno



Clone # 1809
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  base64 import  socket
import  fileinput import  select
import  json import  sys
import  os
 
import  types



Clone # 1810
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  base64 import  os
import  fileinput import  sys
import  json import  re
import  os
 
import  shutil



Clone # 1811
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 19
import  base64 import  os
import  fileinput import  pkgutil
import  json import  sys
import  os
 
import  yaml



Clone # 1812
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 18
import  base64 import  platform
import  fileinput import  os
import  json import  pkgutil
import  os
 
import  sys



Clone # 1813
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  base64 import  sqlite3
import  fileinput import  errno
import  json import  re
import  os
 
import  struct



Clone # 1814
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  base64 import  logging
import  fileinput import  sqlite3
import  json import  errno
import  os
 
import  re



Clone # 1815
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  base64 import  os
import  fileinput import  time
import  json import  itertools
import  os
 
import  codecs



Clone # 1816
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  base64 import  logging
import  fileinput import  os
import  json import  time
import  os
 
import  itertools



Clone # 1817
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  base64 import  logging
import  fileinput import  time
import  json import  itertools
import  os
 
import  re
 



Clone # 1818
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  base64 import  yaml
import  fileinput import  logging
import  json import  time
import  os
 
import  itertools



Clone # 1819
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  base64 import  codecs
import  fileinput import  yaml
import  json import  logging
import  os
 
import  time



Clone # 1820
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  base64 import  ConfigParser
import  fileinput import  codecs
import  json import  yaml
import  os
 
import  logging



Clone # 1821
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  base64 import  os
import  fileinput import  ConfigParser
import  json import  codecs
import  os
 
import  yaml



Clone # 1822
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 20
import  base64 import  logging
import  fileinput import  shlex
import  json import  unicodedata
import  os
 
import  traceback



Clone # 1823
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 19
import  base64 import  sys
import  fileinput import  logging
import  json import  shlex
import  os
 
import  unicodedata



Clone # 1824
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 18
import  base64 import  re
import  fileinput import  sys
import  json import  logging
import  os
 
import  shlex



Clone # 1825
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/library.py"
The first line is 17
import  base64 import  os
import  fileinput import  re
import  json import  sys
import  os
 
import  logging



Clone # 1826
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  base64 import  errno
import  fileinput import  logging
import  json import  os
import  os
 
import  re



Clone # 1827
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  base64 import  datetime
import  fileinput import  os
import  json import  socket
import  os
 
import  subprocess



Clone # 1828
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  base64 import  os
import  fileinput import  termios
import  json import  threading
import  os
 
import  errno
 



Clone # 1829
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  base64 import  fcntl
import  fileinput import  os
import  json import  termios
import  os
 
import  threading



Clone # 1830
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  base64 import  tty
import  fileinput import  fcntl
import  json import  os
import  os
 
import  termios



Clone # 1831
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  base64 import  sys
import  fileinput import  tty
import  json import  fcntl
import  os
 
import  os



Clone # 1832
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  base64 import  re
import  fileinput import  shlex
import  json import  struct
 
import  os
 
import  requests



Clone # 1833
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  base64 import  json
import  fileinput import  re
import  json import  shlex
import  os
 
import  struct
 



Clone # 1834
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  shlex import  socket
import  struct
 
import  select
import  requests import  sys
import  requests.exceptions import  types



Clone # 1835
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  shlex import  os
import  struct
 
import  sys
import  requests import  re
import  requests.exceptions import  shutil



Clone # 1836
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 18
import  shlex import  platform
import  struct
 
import  os
import  requests import  pkgutil
import  requests.exceptions import  sys



Clone # 1837
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  shlex import  logging
import  struct
 
import  sqlite3
import  requests import  errno
import  requests.exceptions import  re



Clone # 1838
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  shlex import  logging
import  struct
 
import  os
import  requests import  time
import  requests.exceptions import  itertools



Clone # 1839
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  shlex import  os
import  struct
 
import  ConfigParser
import  requests import  codecs
import  requests.exceptions import  yaml



Clone # 1840
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/beets/library.py"
The first line is 17
import  shlex import  os
import  struct
 
import  re
import  requests import  sys
import  requests.exceptions import  logging



Clone # 1841
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  shlex import  errno
import  struct
 
import  logging
import  requests import  os
import  requests.exceptions import  re



Clone # 1842
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  shlex import  datetime
import  struct
 
import  os
import  requests import  socket
import  requests.exceptions import  subprocess



Clone # 1843
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  shlex import  sys
import  struct
 
import  tty
import  requests import  fcntl
import  requests.exceptions import  os



Clone # 1844
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  shlex import  json
import  struct
 
import  re
import  requests import  shlex
import  requests.exceptions import  struct
 



Clone # 1845
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  logging import  time
import  re import  itertools
import  os import  codecs
import  sys import  platform
 



Clone # 1846
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  logging import  types
import  re import  errno
import  os import  traceback
import  sys import  time



Clone # 1847
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  logging import  sys
import  re import  types
import  os import  errno
import  sys import  traceback



Clone # 1848
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  logging import  select
import  re import  sys
import  os import  types
import  sys import  errno



Clone # 1849
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  logging import  socket
import  re import  select
import  os import  sys
import  sys import  types



Clone # 1850
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 19
import  logging import  os
import  re import  pkgutil
import  os import  sys
import  sys import  yaml



Clone # 1851
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  logging import  sqlite3
import  re import  errno
import  os import  re
import  sys import  struct



Clone # 1852
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  logging import  os
import  re import  time
import  os import  itertools
import  sys import  codecs



Clone # 1853
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  logging import  logging
import  re import  time
import  os import  itertools
import  sys import  re
 



Clone # 1854
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  logging import  yaml
import  re import  logging
import  os import  time
import  sys import  itertools



Clone # 1855
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  logging import  codecs
import  re import  yaml
import  os import  logging
import  sys import  time



Clone # 1856
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  logging import  ConfigParser
import  re import  codecs
import  os import  yaml
import  sys import  logging



Clone # 1857
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  logging import  os
import  re import  ConfigParser
import  os import  codecs
import  sys import  yaml



Clone # 1858
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 20
import  logging import  logging
import  re import  shlex
import  os import  unicodedata
import  sys import  traceback



Clone # 1859
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 19
import  logging import  sys
import  re import  logging
import  os import  shlex
import  sys import  unicodedata



Clone # 1860
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 18
import  logging import  re
import  re import  sys
import  os import  logging
import  sys import  shlex



Clone # 1861
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/library.py"
The first line is 17
import  logging import  os
import  re import  re
import  os import  sys
import  sys import  logging



Clone # 1862
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  logging import  os
import  re import  termios
import  os import  threading
import  sys import  errno
 



Clone # 1863
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  logging import  fcntl
import  re import  os
import  os import  termios
import  sys import  threading



Clone # 1864
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  logging import  tty
import  re import  fcntl
import  os import  os
import  sys import  termios



Clone # 1865
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  logging import  re
import  re import  shlex
import  os import  struct
 
import  sys import  requests



Clone # 1866
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  logging import  json
import  re import  re
import  os import  shlex
import  sys import  struct
 



Clone # 1867
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 20
import  threading import  pkgutil
import  sqlite3 import  sys
import  contextlib
 
import  yaml
import  beets import  types



Clone # 1868
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/beets/util/confit.py"
The first line is 20
import  locale import  pkgutil
import  optparse import  sys
import  textwrap import  yaml
import  sys import  types



Clone # 1869
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 20
import  logging import  pkgutil
import  musicbrainzngs import  sys
import  re import  yaml
import  traceback import  types



Clone # 1870
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 20
import  os import  pkgutil
import  logging import  sys
import  pickle import  yaml
import  itertools import  types



Clone # 1871
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 20
import  io import  pkgutil
import  tarfile import  sys
import  tempfile
 
import  yaml
import  requests import  types



Clone # 1872
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 20
import  base64 import  pkgutil
import  fileinput import  sys
import  json import  yaml
import  os
 
import  types



Clone # 1873
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 20
import  logging import  pkgutil
import  re import  sys
import  os import  yaml
import  sys import  types



Clone # 1874
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/dbcore/db.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  threading import  termios
import  sqlite3 import  threading
import  contextlib
 
import  errno
 
import  beets import  logging



Clone # 1875
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 21
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  locale import  termios
import  optparse import  threading
import  textwrap import  errno
 
import  sys import  logging



Clone # 1876
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/autotag/mb.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  logging import  termios
import  musicbrainzngs import  threading
import  re import  errno
 
import  traceback import  logging



Clone # 1877
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/importer.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  os import  termios
import  logging import  threading
import  pickle import  errno
 
import  itertools import  logging



Clone # 1878
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  io import  termios
import  tarfile import  threading
import  tempfile
 
import  errno
 
import  requests import  logging



Clone # 1879
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  base64 import  termios
import  fileinput import  threading
import  json import  errno
 
import  os
 
import  logging



Clone # 1880
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  logging import  termios
import  re import  threading
import  os import  errno
 
import  sys import  logging



Clone # 1881
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  errno import  socket
import  traceback import  select
import  time import  sys
import  collections
 
 
import  types



Clone # 1882
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  errno import  os
import  traceback import  sys
import  time import  re
import  collections
 
 
import  shutil



Clone # 1883
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/util/confit.py"
The first line is 18
import  errno import  platform
import  traceback import  os
import  time import  pkgutil
import  collections
 
 
import  sys



Clone # 1884
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  errno import  logging
import  traceback import  sqlite3
import  time import  errno
import  collections
 
 
import  re



Clone # 1885
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  errno import  logging
import  traceback import  os
import  time import  time
import  collections
 
 
import  itertools



Clone # 1886
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  errno import  os
import  traceback import  ConfigParser
import  time import  codecs
import  collections
 
 
import  yaml



Clone # 1887
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/beets/library.py"
The first line is 17
import  errno import  os
import  traceback import  re
import  time import  sys
import  collections
 
 
import  logging



Clone # 1888
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  errno import  errno
import  traceback import  logging
import  time import  os
import  collections
 
 
import  re



Clone # 1889
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  errno import  datetime
import  traceback import  os
import  time import  socket
import  collections
 
 
import  subprocess



Clone # 1890
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  errno import  sys
import  traceback import  tty
import  time import  fcntl
import  collections
 
 
import  os



Clone # 1891
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 12
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  errno import  json
import  traceback import  re
import  time import  shlex
import  collections
 
 
import  struct
 



Clone # 1892
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/beets/util/confit.py"
The first line is 20
import  socket import  pkgutil
import  select import  sys
import  sys import  yaml
import  types import  types



Clone # 1893
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 20
import  os import  pkgutil
import  sys import  sys
import  re import  yaml
import  shutil import  types



Clone # 1894
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 20
import  platform import  pkgutil
import  os import  sys
import  pkgutil import  yaml
import  sys import  types



Clone # 1895
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/beets/util/confit.py"
The first line is 20
import  logging import  pkgutil
import  sqlite3 import  sys
import  errno import  yaml
import  re import  types



Clone # 1896
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/beets/util/confit.py"
The first line is 20
import  logging import  pkgutil
import  os import  sys
import  time import  yaml
import  itertools import  types



Clone # 1897
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/beets/util/confit.py"
The first line is 20
import  os import  pkgutil
import  ConfigParser import  sys
import  codecs import  yaml
import  yaml import  types



Clone # 1898
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/beets/util/confit.py"
The first line is 20
import  os import  pkgutil
import  re import  sys
import  sys import  yaml
import  logging import  types



Clone # 1899
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/beets/util/confit.py"
The first line is 20
import  errno import  pkgutil
import  logging import  sys
import  os import  yaml
import  re import  types



Clone # 1900
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 20
import  datetime import  pkgutil
import  os import  sys
import  socket import  yaml
import  subprocess import  types



Clone # 1901
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/beets/util/confit.py"
The first line is 20
import  sys import  pkgutil
import  tty import  sys
import  fcntl import  yaml
import  os import  types



Clone # 1902
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/beets/util/confit.py"
The first line is 20
import  json import  pkgutil
import  re import  sys
import  shlex import  yaml
import  struct
 
import  types



Clone # 1903
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/bluelet.py"
The first line is 8
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  socket import  termios
import  select import  threading
import  sys import  errno
 
import  types import  logging



Clone # 1904
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/__init__.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  os import  termios
import  sys import  threading
import  re import  errno
 
import  shutil import  logging



Clone # 1905
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/util/confit.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  platform import  termios
import  os import  threading
import  pkgutil import  errno
 
import  sys import  logging



Clone # 1906
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/__init__.py"
The first line is 26
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  logging import  termios
import  sqlite3 import  threading
import  errno import  errno
 
import  re import  logging



Clone # 1907
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 20
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  logging import  termios
import  os import  threading
import  time import  errno
 
import  itertools import  logging



Clone # 1908
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/migrate.py"
The first line is 18
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  os import  termios
import  ConfigParser import  threading
import  codecs import  errno
 
import  yaml import  logging



Clone # 1909
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/library.py"
The first line is 17
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  os import  termios
import  re import  threading
import  sys import  errno
 
import  logging import  logging



Clone # 1910
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  errno import  termios
import  logging import  threading
import  os import  errno
 
import  re import  logging



Clone # 1911
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  datetime import  termios
import  os import  threading
import  socket import  errno
 
import  subprocess import  logging



Clone # 1912
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  sys import  termios
import  tty import  threading
import  fcntl import  errno
 
import  os import  logging



Clone # 1913
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  json import  termios
import  re import  threading
import  shlex import  errno
 
import  struct
 
import  logging



Clone # 1914
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
import  itertools import  logging
import  codecs import  sys
import  platform
 
import  re
import  beets import  signal
 



Clone # 1915
Distance between two fragments = 3
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/dbcore/db.py"
The first line is 20
import  itertools import  threading
import  codecs import  sqlite3
import  platform
 
import  contextlib
 
import  beets import  beets



Clone # 1916
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  itertools import  socket
import  codecs import  select
import  platform
 
import  sys
import  beets import  types



Clone # 1917
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/util/__init__.py"
The first line is 18
import  itertools import  os
import  codecs import  sys
import  platform
 
import  re
import  beets import  shutil



Clone # 1918
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/util/confit.py"
The first line is 18
import  itertools import  platform
import  codecs import  os
import  platform
 
import  pkgutil
import  beets import  sys



Clone # 1919
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/util/functemplate.py"
The first line is 30
import  itertools import  re
import  codecs import  ast
import  platform
 
import  dis
import  beets import  types
 



Clone # 1920
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/ui/__init__.py"
The first line is 26
import  itertools import  logging
import  codecs import  sqlite3
import  platform
 
import  errno
import  beets import  re



Clone # 1921
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/ui/__init__.py"
The first line is 21
import  itertools import  locale
import  codecs import  optparse
import  platform
 
import  textwrap
import  beets import  sys



Clone # 1922
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/ui/commands.py"
The first line is 20
import  itertools import  logging
import  codecs import  os
import  platform
 
import  time
import  beets import  itertools



Clone # 1923
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  itertools import  os
import  codecs import  ConfigParser
import  platform
 
import  codecs
import  beets import  yaml



Clone # 1924
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/autotag/mb.py"
The first line is 17
import  itertools import  logging
import  codecs import  musicbrainzngs
import  platform
 
import  re
import  beets import  traceback



Clone # 1925
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/importer.py"
The first line is 20
import  itertools import  os
import  codecs import  logging
import  platform
 
import  pickle
import  beets import  itertools



Clone # 1926
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/beets/library.py"
The first line is 17
import  itertools import  os
import  codecs import  re
import  platform
 
import  sys
import  beets import  logging



Clone # 1927
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/cli/command.py"
The first line is 5
import  itertools import  errno
import  codecs import  logging
import  platform
 
import  os
import  beets import  re



Clone # 1928
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/cli/utils.py"
The first line is 4
import  itertools import  datetime
import  codecs import  os
import  platform
 
import  socket
import  beets import  subprocess



Clone # 1929
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 4
import  itertools import  sys
import  codecs import  tty
import  platform
 
import  fcntl
import  beets import  os



Clone # 1930
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  itertools import  io
import  codecs import  tarfile
import  platform
 
import  tempfile
 
import  beets import  requests



Clone # 1931
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  itertools import  base64
import  codecs import  fileinput
import  platform
 
import  json
import  beets import  os
 



Clone # 1932
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  itertools import  json
import  codecs import  re
import  platform
 
import  shlex
import  beets import  struct
 



Clone # 1933
Distance between two fragments = 4
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 23
Source file "../tests/fig/fig/service.py"
The first line is 4
import  itertools import  logging
import  codecs import  re
import  platform
 
import  os
import  beets import  sys



Clone # 1934
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/bluelet.py"
The first line is 12
import  logging import  errno
import  sys import  traceback
import  re import  time
import  signal
 
import  collections
 
 



Clone # 1935
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/bluelet.py"
The first line is 11
import  logging import  types
import  sys import  errno
import  re import  traceback
import  signal
 
import  time



Clone # 1936
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/bluelet.py"
The first line is 10
import  logging import  sys
import  sys import  types
import  re import  errno
import  signal
 
import  traceback



Clone # 1937
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/bluelet.py"
The first line is 9
import  logging import  select
import  sys import  sys
import  re import  types
import  signal
 
import  errno



Clone # 1938
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/bluelet.py"
The first line is 8
import  logging import  socket
import  sys import  select
import  re import  sys
import  signal
 
import  types



Clone # 1939
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/__init__.py"
The first line is 19
import  logging import  sys
import  sys import  re
import  re import  shutil
import  signal
 
import  fnmatch



Clone # 1940
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/confit.py"
The first line is 20
import  logging import  pkgutil
import  sys import  sys
import  re import  yaml
import  signal
 
import  types



Clone # 1941
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/util/confit.py"
The first line is 19
import  logging import  os
import  sys import  pkgutil
import  re import  sys
import  signal
 
import  yaml



Clone # 1942
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/__init__.py"
The first line is 28
import  logging import  errno
import  sys import  re
import  re import  struct
import  signal
 
import  traceback
 



Clone # 1943
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/__init__.py"
The first line is 27
import  logging import  sqlite3
import  sys import  errno
import  re import  re
import  signal
 
import  struct



Clone # 1944
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/commands.py"
The first line is 22
import  logging import  time
import  sys import  itertools
import  re import  codecs
import  signal
 
import  platform
 



Clone # 1945
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/commands.py"
The first line is 21
import  logging import  os
import  sys import  time
import  re import  itertools
import  signal
 
import  codecs



Clone # 1946
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 23
import  logging import  time
import  sys import  itertools
import  re import  re
 
import  signal
 
import  beets



Clone # 1947
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 22
import  logging import  logging
import  sys import  time
import  re import  itertools
import  signal
 
import  re
 



Clone # 1948
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 21
import  logging import  yaml
import  sys import  logging
import  re import  time
import  signal
 
import  itertools



Clone # 1949
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 20
import  logging import  codecs
import  sys import  yaml
import  re import  logging
import  signal
 
import  time



Clone # 1950
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 19
import  logging import  ConfigParser
import  sys import  codecs
import  re import  yaml
import  signal
 
import  logging



Clone # 1951
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/ui/migrate.py"
The first line is 18
import  logging import  os
import  sys import  ConfigParser
import  re import  codecs
import  signal
 
import  yaml



Clone # 1952
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/autotag/mb.py"
The first line is 17
import  logging import  logging
import  sys import  musicbrainzngs
import  re import  re
import  signal
 
import  traceback



Clone # 1953
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/library.py"
The first line is 21
import  logging import  shlex
import  sys import  unicodedata
import  re import  traceback
import  signal
 
import  time



Clone # 1954
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/library.py"
The first line is 20
import  logging import  logging
import  sys import  shlex
import  re import  unicodedata
import  signal
 
import  traceback



Clone # 1955
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/library.py"
The first line is 19
import  logging import  sys
import  sys import  logging
import  re import  shlex
import  signal
 
import  unicodedata



Clone # 1956
Distance between two fragments = 3
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/library.py"
The first line is 18
import  logging import  re
import  sys import  sys
import  re import  logging
import  signal
 
import  shlex



Clone # 1957
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/beets/library.py"
The first line is 17
import  logging import  os
import  sys import  re
import  re import  sys
import  signal
 
import  logging



Clone # 1958
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/command.py"
The first line is 6
import  logging import  logging
import  sys import  os
import  re import  re
import  signal
 
import  yaml



Clone # 1959
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/utils.py"
The first line is 5
import  logging import  os
import  sys import  socket
import  re import  subprocess
import  signal
 
import  platform



Clone # 1960
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 8
import  logging import  termios
import  sys import  threading
import  re import  errno
 
import  signal
 
import  logging



Clone # 1961
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 7
import  logging import  os
import  sys import  termios
import  re import  threading
import  signal
 
import  errno
 



Clone # 1962
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 6
import  logging import  fcntl
import  sys import  os
import  re import  termios
import  signal
 
import  threading



Clone # 1963
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/cli/socketclient.py"
The first line is 5
import  logging import  tty
import  sys import  fcntl
import  re import  os
import  signal
 
import  termios



Clone # 1964
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/packages/docker/utils/utils.py"
The first line is 15
import  logging import  io
import  sys import  tarfile
import  re import  tempfile
 
import  signal
 
import  requests



Clone # 1965
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/packages/docker/auth/auth.py"
The first line is 15
import  logging import  base64
import  sys import  fileinput
import  re import  json
import  signal
 
import  os
 



Clone # 1966
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 17
import  logging import  shlex
import  sys import  struct
 
import  re import  requests
import  signal
 
import  requests.exceptions



Clone # 1967
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 16
import  logging import  re
import  sys import  shlex
import  re import  struct
 
import  signal
 
import  requests



Clone # 1968
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/cli/main.py"
The first line is 3
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 15
import  logging import  json
import  sys import  re
import  re import  shlex
import  signal
 
import  struct
 



Clone # 1969
Distance between two fragments = 4
Clone size = 4
Source file "../tests/fig/fig/packages/six.py"
The first line is 286
Source file "../tests/fig/fig/packages/six.py"
The first line is 278
def  iteritems(d,  **kw):
    """Return  an  iterator  over  the  (key,  value)  pairs  of  a  dictionary."""
    return  iter(getattr(d,  _iteritems)(**kw))
 
def  iterkeys(d,  **kw):
    """Return  an  iterator  over  the  keys  of  a  dictionary."""
    return  iter(getattr(d,  _iterkeys)(**kw))
 
def  iterlists(d,  **kw):
    """Return  an  iterator  over  the  (key,  [values])  pairs  of  a  dictionary."""
    return  iter(getattr(d,  _iterlists)(**kw))
 
 
def  itervalues(d,  **kw):
    """Return  an  iterator  over  the  values  of  a  dictionary."""
    return  iter(getattr(d,  _itervalues)(**kw))
 



Clone # 1970
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 616
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 588
  for  desc1,  desc2,  expected  in  data:
    node1  =  model.objects.get(desc=desc1)
    node2  =  model.objects.get(desc=desc2)
    assert  node1.is_descendant_of(node2)  ==  expected

  for  desc1,  desc2,  expected  in  data:
    node1  =  model.objects.get(desc=desc1)
    node2  =  model.objects.get(desc=desc2)
    assert  node1.is_sibling_of(node2)  ==  expected



Clone # 1971
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 602
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 588
  for  desc1,  desc2,  expected  in  data:
    node1  =  model.objects.get(desc=desc1)
    node2  =  model.objects.get(desc=desc2)
    assert  node1.is_child_of(node2)  ==  expected
  for  desc1,  desc2,  expected  in  data:
    node1  =  model.objects.get(desc=desc1)
    node2  =  model.objects.get(desc=desc2)
    assert  node1.is_sibling_of(node2)  ==  expected



Clone # 1972
Distance between two fragments = 2
Clone size = 4
Source file "../tests/fig/fig/service.py"
The first line is 82
Source file "../tests/fig/fig/service.py"
The first line is 77
  def  kill(self,  **options):
    for  c  in  self.containers():
      log.info("Killing  %s..."  %  c.name)
      c.kill(**options)
  def  stop(self,  **options):
    for  c  in  self.containers():
      log.info("Stopping  %s..."  %  c.name)
      c.stop(**options)



Clone # 1973
Distance between two fragments = 1
Clone size = 4
Source file "../tests/beets/ui/commands.py"
The first line is 798
Source file "../tests/beets/ui/commands.py"
The first line is 1145
import_cmd.parser.add_option('-w',  '--write',  action='store_true',
  default=None,  help="write  new  metadata  to  files'  tags  (default)")
modify_cmd.parser.add_option('-w',  '--write',  action='store_true',
  default=None,  help="write  new  metadata  to  files'  tags  (default)")
import_cmd.parser.add_option('-W',  '--nowrite',  action='store_false',
  dest='write',  help="don't  write  metadata  (opposite  of  -w)")
modify_cmd.parser.add_option('-W',  '--nowrite',  action='store_false',
  dest='write',  help="don't  write  metadata  (opposite  of  -w)")



Clone # 1974
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 286
self.child_page  =  SimplePage() self.section_b  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.section_b.title  =  "Section  B"
self.child_page.slug  =  "hello-world" self.section_b.slug  =  "section-b"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.section_b)



Clone # 1975
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 281
self.child_page  =  SimplePage() self.section_a  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.section_a.title  =  "Section  A"
self.child_page.slug  =  "hello-world" self.section_a.slug  =  "section-a"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.section_a)



Clone # 1976
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 292
self.child_page  =  SimplePage() self.test_page  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.test_page.title  =  "Hello  world!"
self.child_page.slug  =  "hello-world" self.test_page.slug  =  "hello-world"
  self.root_page.add_child(self.child_page)
  self.section_a.add_child(self.test_page)



Clone # 1977
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 222
self.child_page  =  SimplePage() self.child_page  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.child_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.child_page)



Clone # 1978
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
self.child_page  =  SimplePage() self.event_page  =  EventPage()
self.child_page.title  =  "Hello  world!" self.event_page.title  =  "Event  page"
self.child_page.slug  =  "hello-world" self.event_page.slug  =  "event-page"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.event_page)



Clone # 1979
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 125
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 25
self.child_page  =  SimplePage() self.child_page  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.child_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.child_page)
  self.root_page.add_child(self.child_page)



Clone # 1980
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 286
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 222
self.section_b  =  SimplePage() self.child_page  =  SimplePage()
self.section_b.title  =  "Section  B" self.child_page.title  =  "Hello  world!"
self.section_b.slug  =  "section-b" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_b)
  self.root_page.add_child(self.child_page)



Clone # 1981
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 286
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
self.section_b  =  SimplePage() self.event_page  =  EventPage()
self.section_b.title  =  "Section  B" self.event_page.title  =  "Event  page"
self.section_b.slug  =  "section-b" self.event_page.slug  =  "event-page"
  self.root_page.add_child(self.section_b)
  self.root_page.add_child(self.event_page)



Clone # 1982
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 286
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 25
self.section_b  =  SimplePage() self.child_page  =  SimplePage()
self.section_b.title  =  "Section  B" self.child_page.title  =  "Hello  world!"
self.section_b.slug  =  "section-b" self.child_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_b)
  self.root_page.add_child(self.child_page)



Clone # 1983
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 281
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 292
self.section_a  =  SimplePage() self.test_page  =  SimplePage()
self.section_a.title  =  "Section  A" self.test_page.title  =  "Hello  world!"
self.section_a.slug  =  "section-a" self.test_page.slug  =  "hello-world"
  self.root_page.add_child(self.section_a)
  self.section_a.add_child(self.test_page)



Clone # 1984
Distance between two fragments = 4
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 281
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 166
self.section_a  =  SimplePage() self.event_page  =  EventPage()
self.section_a.title  =  "Section  A" self.event_page.title  =  "Event  page"
self.section_a.slug  =  "section-a" self.event_page.slug  =  "event-page"
  self.root_page.add_child(self.section_a)
  self.root_page.add_child(self.event_page)



Clone # 1985
Distance between two fragments = 2
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 664
Source file "../tests/wagtail/wagtail/wagtailcore/models.py"
The first line is 717
  def  can_add_subpage(self):
    if  not  self.user.is_active:
      return  False
    return  self.user.is_superuser  or  ('add'  in  self.permissions)
  def  can_publish_subpage(self):
    """
    Niggly  special  case  for  creating  and  publishing  a  page  in  one  go.
    Differs  from  can_publish  in  that  we  want  to  be  able  to  publish  subpages  of  root,  but  not
    to  be  able  to  publish  root  itself
    """
   
if  not  self.user.is_active:
      return  False

    return  self.user.is_superuser  or  ('publish'  in  self.permissions)



Clone # 1986
Distance between two fragments = 3
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 278
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 155
  self.root_page  =  Page.objects.get(id=2)
  self.root_page  =  Page.objects.get(id=2)
self.section_a  =  SimplePage() self.child_page  =  SimplePage()
self.section_a.title  =  "Section  A" self.child_page.title  =  "Hello  world!"
self.section_a.slug  =  "section-a" self.child_page.slug  =  "hello-world"



Clone # 1987
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 219
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 155
  self.root_page  =  Page.objects.get(id=2)
  self.root_page  =  Page.objects.get(id=2)
self.child_page  =  SimplePage() self.child_page  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.child_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"



Clone # 1988
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 22
Source file "../tests/wagtail/wagtail/wagtailadmin/tests.py"
The first line is 155
  self.root_page  =  Page.objects.get(id=2)
  self.root_page  =  Page.objects.get(id=2)
self.child_page  =  SimplePage() self.child_page  =  SimplePage()
self.child_page.title  =  "Hello  world!" self.child_page.title  =  "Hello  world!"
self.child_page.slug  =  "hello-world" self.child_page.slug  =  "hello-world"



Clone # 1989
Distance between two fragments = 1
Clone size = 4
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 673
Source file "../tests/fig/fig/packages/docker/client.py"
The first line is 729
if  isinstance(container,  dict):
  container  =  container.get('Id')
if  isinstance(container,  dict):
  container  =  container.get('Id')
params  =  {'t':  timeout} params  =  {'t':  timeout}
url  =  self._url("/containers/{0}/restart".format(container)) url  =  self._url("/containers/{0}/stop".format(container))



Clone # 1990
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2273
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1991
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2244
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1992
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2221
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1993
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2159
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1994
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2127
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1995
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2092
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1996
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2273
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1997
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2244
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1998
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2221
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 1999
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2159
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 2000
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2127
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 2001
Distance between two fragments = 1
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 2092
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
m  =  admin_class(model,  site) ma  =  admin_class(model,  site)



Clone # 2002
Distance between two fragments = 0
Clone size = 4
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1887
Source file "../tests/wagtail/wagtail/vendor/django-treebeard/treebeard/tests/test_treebeard.py"
The first line is 1906
site  =  AdminSite() site  =  AdminSite()
form_class  =  movenodeform_factory(model) form_class  =  movenodeform_factory(model)
admin_class  =  admin_factory(form_class) admin_class  =  admin_factory(form_class)
ma  =  admin_class(model,  site) ma  =  admin_class(model,  site)


(*) Warning: the highlighting of differences is based on diff and doesn't reflect the tree-based clone detection algorithm.


Clone Digger is aimed to find software clones in Python and Java programs. It is provided under the GPL license and can be downloaded from the site http://clonedigger.sourceforge.net